{"id":20406739,"url":"https://github.com/xwp/stylelint-config-xwp","last_synced_at":"2026-05-09T08:10:03.737Z","repository":{"id":66346487,"uuid":"98421773","full_name":"xwp/stylelint-config-xwp","owner":"xwp","description":"XWP shareable config for stylelint based on WordPress standards","archived":false,"fork":false,"pushed_at":"2017-08-01T11:55:36.000Z","size":356,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-30T13:03:36.656Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xwp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-26T12:45:22.000Z","updated_at":"2017-07-26T12:46:44.000Z","dependencies_parsed_at":"2023-02-21T23:46:41.444Z","dependency_job_id":null,"html_url":"https://github.com/xwp/stylelint-config-xwp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xwp/stylelint-config-xwp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fstylelint-config-xwp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fstylelint-config-xwp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fstylelint-config-xwp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fstylelint-config-xwp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xwp","download_url":"https://codeload.github.com/xwp/stylelint-config-xwp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwp%2Fstylelint-config-xwp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32811676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T05:19:05.988Z","updated_at":"2026-05-09T08:10:03.690Z","avatar_url":"https://github.com/xwp.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stylelint-config-xwp\n[![NPM version](http://img.shields.io/npm/v/stylelint-config-xwp.svg)](https://www.npmjs.org/package/stylelint-config-xwp)\n\n\u003e XWP shareable config for stylelint that extends [WordPress CSS Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/css/).\n\nThis project is based on [stylelint-config-wordpress](https://github.com/WordPress-Coding-Standards/stylelint-config-wordpress).\n\n## Table of Contents\n\n-   [Why not just WordPress standards?](#why-not-just-wordpress-standards)\n-   [Installation](#installation)\n-   [Usage](#usage)\n-   [Presets](#presets)\n-   [Extending the config](#extending-the-config)\n-   [Changelog](#changelog)\n-   [License](#license)\n\n## Why not just WordPress standards?\n\nWe decided to relax or override some of the rules defined in the `stylelint-config-wordpress` ruleset.\nWe feel that with the following changes, the CSS code is more consistent and better reflects the WordPress coding standards for PHP and Javascript.\n\nHere are key differences to the official WordPress CSS standards:\n\n* `function-url-quotes` - use quotes in all functions.\n* `string-quotes` - use single quotes instead of double quotes.\n* `function-parentheses-space-inside` - add whitespace after opening and before closing parentheses.\n* `color-hex-length` - relax hex color values formatting. Shortening the hex values whenever possible is a micro-optimization which can be easily automated nowadays by using build tools.\n\nThere are also grey areas not defined in the WordPress CSS Coding Standards, but standardized in the `stylelint-config-wordpress`, which are altered in `stylelint-config-xwp`:\n\n* `at-rule-empty-line-before` - allow for grouping of the same name blockless at rules (`blockless-after-same-name-blockless`). Also, ignore not only `@else` but also `@elseif` rule.\n* `selector-pseudo-element-colon-notation` - the single colon notation is included in the `stylelint-config-wordpress` in order to maintain the Internet Explorer 8 support. Since IE 8 is no longer supported by WordPress as of version 4.8, we opt for using a valid CSS notation, i.e. double colons.\n\n## Installation\n\n```bash\n$ npm install stylelint-config-xwp --save-dev\n```\n\n## Usage\n\nIf you've installed `stylelint-config-xwp` locally within your project, just set your `stylelint` config to:\n\n```json\n{\n  \"extends\": \"stylelint-config-xwp\"\n}\n```\n\nIf you've globally installed `stylelint-config-xwp` using the `-g` flag, then you'll need to use the absolute path to `stylelint-config-xwp` in your config:\n\n```json\n{\n  \"extends\": \"/absolute/path/to/stylelint-config-xwp\"\n}\n```\n\n## Presets\n\nIn addition to the default preset, there are also specific presets. All presets extend the default one.\n\n### SCSS\n\n```json\n{\n  \"extends\": [\n    \"stylelint-config-xwp/scss\"\n  ]\n}\n```\n\n## Extending the config\n\nSimply add a `\"rules\"` key to your config and add your overrides there.\n\nFor example, to change the `indentation` to four spaces and turn off the `number-leading-zero` rule:\n\n\n```json\n{\n  \"extends\": \"stylelint-config-xwp\",\n  \"rules\": {\n    \"indentation\": 4,\n    \"number-leading-zero\": null\n  }\n}\n```\n\n## [Changelog](CHANGELOG.md)\n\n## [License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwp%2Fstylelint-config-xwp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxwp%2Fstylelint-config-xwp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwp%2Fstylelint-config-xwp/lists"}