{"id":24133444,"url":"https://github.com/projectwallace/stylelint-plugin","last_synced_at":"2026-05-02T21:04:23.797Z","repository":{"id":211788391,"uuid":"729290363","full_name":"projectwallace/stylelint-plugin","owner":"projectwallace","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-17T13:24:53.000Z","size":179,"stargazers_count":1,"open_issues_count":11,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-19T13:33:57.387Z","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/projectwallace.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-08T20:25:33.000Z","updated_at":"2025-09-17T13:24:56.000Z","dependencies_parsed_at":"2024-01-12T19:47:51.305Z","dependency_job_id":"a0398d7b-5486-45c3-9429-f53a11c9f947","html_url":"https://github.com/projectwallace/stylelint-plugin","commit_stats":null,"previous_names":["projectwallace/stylelint-plugins","projectwallace/stylelint-plugin"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/projectwallace/stylelint-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectwallace%2Fstylelint-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectwallace%2Fstylelint-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectwallace%2Fstylelint-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectwallace%2Fstylelint-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projectwallace","download_url":"https://codeload.github.com/projectwallace/stylelint-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectwallace%2Fstylelint-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286079811,"owners_count":27282121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-26T02:00:06.075Z","response_time":193,"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":"2025-01-11T23:37:55.433Z","updated_at":"2026-05-02T21:04:23.791Z","avatar_url":"https://github.com/projectwallace.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @projectwallace/stylelint-plugin\n\nA stylelint plugin that checks the complexity of your CSS.\n\n\u003e Only use this plugin with standard CSS. Non-standard CSS (Sass, Less, etc.) is not supported.\n\n## Installation\n\n```sh\nnpm install --save-dev @projectwallace/stylelint-plugin\n```\n\n## Usage\n\n### Using a preset config (recommended)\n\nThe easiest way to get started is by extending one of the preset configs:\n\n- **`recommended`** — enables all rules with sensible defaults\n- **`design-tokens`** — enables rules that encourage the use of design tokens in your CSS\n- **`performance`** — enables rules that affect file size and loading performance\n- **`maintainability`** — enables rules that limit complexity and enforce conventions to keep CSS easy to reason about and manage over time\n- **`correctness`** - enables rules to help prevent errors\n\n```json\n{\n\t\"extends\": [\"@projectwallace/stylelint-plugin/configs/recommended\"]\n}\n```\n\n### Manual configuration\n\nAlternatively, add the plugin and configure rules individually in your stylelint config:\n\n```json\n{\n\t\"plugins\": [\"@projectwallace/stylelint-plugin\"],\n\t\"rules\": {\n\t\t\"projectwallace/max-average-declarations-per-rule\": 5,\n\t\t\"projectwallace/max-average-selector-complexity\": 2,\n\t\t\"projectwallace/max-average-selectors-per-rule\": 2,\n\t\t\"projectwallace/max-average-specificity\": [0, 2.5, 1],\n\t\t\"projectwallace/max-comment-size\": 2500,\n\t\t\"projectwallace/max-embedded-content-size\": 10000,\n\t\t\"projectwallace/max-file-size\": 200000,\n\t\t\"projectwallace/max-important-ratio\": 1\n\t\t// ... etc ...\n\t}\n}\n```\n\n## Rules\n\nAll rules are included in the **recommended** config. The specialized configs below group rules by concern.\n\n### Performance\n\nRules that affect file size and loading performance.\n\n| Rule                                                                       | Description                                                               |\n| -------------------------------------------------------------------------- | ------------------------------------------------------------------------- |\n| [max-comment-size](src/rules/max-comment-size/README.md)                   | Limit the total byte size of comments in a stylesheet                     |\n| [max-embedded-content-size](src/rules/max-embedded-content-size/README.md) | Limit the total byte size of embedded content (data URIs) in a stylesheet |\n| [max-file-size](src/rules/max-file-size/README.md)                         | Limit the total byte size of a stylesheet                                 |\n| [max-lines-of-code](src/rules/max-lines-of-code/README.md)                 | Prevent a stylesheet from exceeding a predefined number of lines of code  |\n| [no-duplicate-data-urls](src/rules/no-duplicate-data-urls/README.md)       | Disallow the same data URL from being used more than once                 |\n| [no-unused-layers](src/rules/no-unused-layers/README.md)                   | Disallow `@layer` names that are declared but never implemented           |\n\n### Design Tokens\n\nRules that encourage the use of design tokens in your CSS.\n\n| Rule                                                                                 | Description                                           |\n| ------------------------------------------------------------------------------------ | ----------------------------------------------------- |\n| [max-unique-animation-functions](src/rules/max-unique-animation-functions/README.md) | Limit the number of unique animation timing functions |\n| [max-unique-box-shadows](src/rules/max-unique-box-shadows/README.md)                 | Limit the number of unique box-shadow values          |\n| [max-unique-color-formats](src/rules/max-unique-color-formats/README.md)             | Limit the number of distinct color formats            |\n| [max-unique-colors](src/rules/max-unique-colors/README.md)                           | Limit the number of unique color values               |\n| [max-unique-durations](src/rules/max-unique-durations/README.md)                     | Limit the number of unique duration values            |\n| [max-unique-gradients](src/rules/max-unique-gradients/README.md)                     | Limit the number of unique gradient values            |\n| [max-unique-font-families](src/rules/max-unique-font-families/README.md)             | Limit the number of unique font families              |\n| [max-unique-font-sizes](src/rules/max-unique-font-sizes/README.md)                   | Limit the number of unique font sizes                 |\n| [max-unique-keyframes](src/rules/max-unique-keyframes/README.md)                     | Limit the number of unique keyframe animations        |\n| [max-unique-media-queries](src/rules/max-unique-media-queries/README.md)             | Limit the number of unique media queries              |\n| [max-unique-supports-queries](src/rules/max-unique-supports-queries/README.md)       | Limit the number of unique supports queries           |\n| [max-unique-text-shadows](src/rules/max-unique-text-shadows/README.md)               | Limit the number of unique text-shadow values         |\n\n### Correctness\n\nRules to help prevent errors.\n\n| Rule                                                                                               | Description                                                                |\n| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |\n| [no-unknown-container-names](src/rules/no-unknown-container-names/README.md)                       | Disallow container names in `@container` that were never declared          |\n| [no-unknown-custom-property](src/rules/no-unknown-custom-property/README.md)                       | Disallow the use of undeclared custom properties in a `var()`              |\n| [no-useless-custom-property-assignment](src/rules/no-useless-custom-property-assignment/README.md) | Disallow custom property assignments that reference themselves via `var()` |\n| [no-unused-container-names](src/rules/no-unused-container-names/README.md)                         | Disallow container names that are declared but never queried               |\n| [no-unused-custom-properties](src/rules/no-unused-custom-properties/README.md)                     | Disallow custom properties that are never used in a `var()`                |\n| [no-static-container-query](src/rules/no-static-container-query/README.md)                         | Disallow static (exact-match) numeric container feature conditions         |\n| [no-static-media-query](src/rules/no-static-media-query/README.md)                                 | Disallow static (exact-match) numeric media feature conditions             |\n| [no-unreachable-media-conditions](src/rules/no-unreachable-media-conditions/README.md)             | Disallow media queries with contradictory conditions that can never match  |\n| [no-important-in-keyframes](src/rules/no-important-in-keyframes/README.md)                         | Disallow `!important` declarations inside `@keyframes` blocks              |\n| [no-invalid-z-index](src/rules/no-invalid-z-index/README.md)                                       | Disallow `z-index` values that are not valid 32-bit integers               |\n| [no-unused-layers](src/rules/no-unused-layers/README.md)                                           | Disallow `@layer` names that are declared but never implemented            |\n\n### Maintainability\n\nRules that limit complexity and enforce conventions to keep CSS easy to reason about and manage over time.\n\n| Rule                                                                                       | Description                                                                  |\n| ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------- |\n| [max-atrules](src/rules/max-atrules/README.md)                                             | Limit the total number of at-rules in a stylesheet                           |\n| [max-average-declarations-per-rule](src/rules/max-average-declarations-per-rule/README.md) | Limit the average number of declarations per rule across the stylesheet      |\n| [max-average-selector-complexity](src/rules/max-average-selector-complexity/README.md)     | Limit the average selector complexity across the stylesheet                  |\n| [max-average-selectors-per-rule](src/rules/max-average-selectors-per-rule/README.md)       | Limit the average number of selectors per rule across the stylesheet         |\n| [max-average-specificity](src/rules/max-average-specificity/README.md)                     | Limit the average specificity across the stylesheet                          |\n| [max-declarations](src/rules/max-declarations/README.md)                                   | Limit the total number of declarations in a stylesheet                       |\n| [max-declarations-per-rule](src/rules/max-declarations-per-rule/README.md)                 | Limit the number of declarations in a single rule                            |\n| [max-important-ratio](src/rules/max-important-ratio/README.md)                             | Limit the ratio of `!important` declarations relative to all declarations    |\n| [max-rules](src/rules/max-rules/README.md)                                                 | Limit the total number of rules in a stylesheet                              |\n| [max-selector-complexity](src/rules/max-selector-complexity/README.md)                     | Prevent selector complexity from going over a predefined maximum             |\n| [max-selectors](src/rules/max-selectors/README.md)                                         | Limit the total number of selectors in a stylesheet                          |\n| [max-selectors-per-rule](src/rules/max-selectors-per-rule/README.md)                       | Limit the number of selectors in a single rule                               |\n| [max-spacing-resets](src/rules/max-spacing-resets/README.md)                               | Limit the number of spacing reset declarations across the stylesheet         |\n| [max-unique-color-formats](src/rules/max-unique-color-formats/README.md)                   | Limit the number of distinct color formats used across the stylesheet        |\n| [max-unique-keyframes](src/rules/max-unique-keyframes/README.md)                           | Limit the number of unique keyframe animations defined across the stylesheet |\n| [max-unique-supports-queries](src/rules/max-unique-supports-queries/README.md)             | Limit the number of unique supports queries used across the stylesheet       |\n| [max-unique-units](src/rules/max-unique-units/README.md)                                   | Limit the number of unique CSS units used across the stylesheet              |\n| [max-unique-z-indexes](src/rules/max-unique-z-indexes/README.md)                           | Limit the number of unique z-index values used across the stylesheet         |\n| [min-declaration-uniqueness-ratio](src/rules/min-declaration-uniqueness-ratio/README.md)   | Enforce a minimum ratio of unique declarations across the stylesheet         |\n| [min-selector-uniqueness-ratio](src/rules/min-selector-uniqueness-ratio/README.md)         | Enforce a minimum ratio of unique selectors across the stylesheet            |\n| [no-anonymous-layers](src/rules/no-anonymous-layers/README.md)                             | Disallow anonymous (unnamed) `@layer` blocks                                 |\n| [no-prefixed-atrules](src/rules/no-prefixed-atrules/README.md)                             | Disallow vendor-prefixed at-rules                                            |\n| [no-prefixed-properties](src/rules/no-prefixed-properties/README.md)                       | Disallow vendor-prefixed CSS properties                                      |\n| [no-prefixed-selectors](src/rules/no-prefixed-selectors/README.md)                         | Disallow vendor-prefixed pseudo-classes and pseudo-elements in selectors     |\n| [no-prefixed-values](src/rules/no-prefixed-values/README.md)                               | Disallow vendor-prefixed CSS values                                          |\n| [no-property-browserhacks](src/rules/no-property-browserhacks/README.md)                   | Prevent the use of known browserhacks for properties                         |\n| [no-property-shorthand](src/rules/no-property-shorthand/README.md)                         | Disallow the use of shorthand properties                                     |\n| [no-value-browserhacks](src/rules/no-value-browserhacks/README.md)                         | Disallow the use of known browser hacks in values                            |\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectwallace%2Fstylelint-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectwallace%2Fstylelint-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectwallace%2Fstylelint-plugin/lists"}