stylelint (15.11.0)
Published 2026-02-24 14:05:53 +00:00 by atheaadmin
Installation
registry=npm install stylelint@15.11.0"stylelint": "15.11.0"About this package
Stylelint
A mighty CSS linter that helps you avoid errors and enforce conventions.
Features
It's mighty as it:
- has over 100 built-in rules for modern CSS syntax and features
- supports plugins so you can create your own custom rules
- automatically fixes problems where possible
- supports shareable configs that you can create or extend
- can be customized to your exact needs
- has 15k unit tests making it robust
- is trusted by companies worldwide like Google and GitHub
And it can be extended to:
- extract embedded styles from HTML, Markdown and CSS-in-JS template literals
- parse CSS-like languages like SCSS, Sass, Less and SugarSS
How it'll help you
It'll help you avoid errors, for example:
- invalid things, e.g. malformed grid areas
- valid things that are problematic, e.g. duplicate selectors
- unknown things, e.g. misspelled property names
And enforce conventions, for example:
- disallow things, e.g. specific units
- enforce naming patterns, e.g. for custom properties
- set limits, e.g. the number of ID selectors
- specify notations, e.g. for modern color functions
We recommend using a pretty printer like Prettier alongside Stylelint. Linters and pretty printers are complementary tools that work together to help you write consistent and error-free code.
Example output
Guides
- User guide
- Developer guide
- Migration guide
- Maintainer guide
- About
Contributors
Stylelint is maintained by volunteers. Without the code contributions from all these fantastic people, Stylelint would not exist. Become a contributor.
Sponsors
Thank you to all our sponsors! Become a sponsor.
Backers
Thank you to all our backers! Become a backer.
Website hosting
License
Dependencies
Dependencies
| ID | Version |
|---|---|
| @csstools/css-parser-algorithms | ^2.3.1 |
| @csstools/css-tokenizer | ^2.2.0 |
| @csstools/media-query-list-parser | ^2.1.4 |
| @csstools/selector-specificity | ^3.0.0 |
| balanced-match | ^2.0.0 |
| colord | ^2.9.3 |
| cosmiconfig | ^8.2.0 |
| css-functions-list | ^3.2.1 |
| css-tree | ^2.3.1 |
| debug | ^4.3.4 |
| fast-glob | ^3.3.1 |
| fastest-levenshtein | ^1.0.16 |
| file-entry-cache | ^7.0.0 |
| global-modules | ^2.0.0 |
| globby | ^11.1.0 |
| globjoin | ^0.1.4 |
| html-tags | ^3.3.1 |
| ignore | ^5.2.4 |
| import-lazy | ^4.0.0 |
| imurmurhash | ^0.1.4 |
| is-plain-object | ^5.0.0 |
| known-css-properties | ^0.29.0 |
| mathml-tag-names | ^2.1.3 |
| meow | ^10.1.5 |
| micromatch | ^4.0.5 |
| normalize-path | ^3.0.0 |
| picocolors | ^1.0.0 |
| postcss | ^8.4.28 |
| postcss-resolve-nested-selector | ^0.1.1 |
| postcss-safe-parser | ^6.0.0 |
| postcss-selector-parser | ^6.0.13 |
| postcss-value-parser | ^4.2.0 |
| resolve-from | ^5.0.0 |
| string-width | ^4.2.3 |
| strip-ansi | ^6.0.1 |
| style-search | ^0.1.0 |
| supports-hyperlinks | ^3.0.0 |
| svg-tags | ^1.0.0 |
| table | ^6.8.1 |
| write-file-atomic | ^5.0.1 |
Development Dependencies
| ID | Version |
|---|---|
| @changesets/cli | ^2.26.2 |
| @changesets/get-github-info | ^0.5.2 |
| @jest/globals | ^29.6.4 |
| @stylelint/prettier-config | ^3.0.0 |
| @stylelint/remark-preset | ^4.0.0 |
| @types/balanced-match | ^1.0.3 |
| @types/css-tree | ^2.3.1 |
| @types/debug | ^4.1.8 |
| @types/file-entry-cache | ^5.0.2 |
| @types/global-modules | ^2.0.0 |
| @types/globjoin | ^0.1.0 |
| @types/imurmurhash | ^0.1.1 |
| @types/micromatch | ^4.0.2 |
| @types/normalize-path | ^3.0.0 |
| @types/postcss-less | ^4.0.2 |
| @types/postcss-resolve-nested-selector | ^0.1.0 |
| @types/postcss-safe-parser | ^5.0.1 |
| @types/style-search | ^0.1.3 |
| @types/svg-tags | ^1.0.0 |
| @types/write-file-atomic | ^4.0.0 |
| benchmark | ^2.1.4 |
| common-tags | ^1.8.2 |
| deepmerge | ^4.3.1 |
| eslint | ^8.48.0 |
| eslint-config-stylelint | ^20.0.0 |
| eslint-plugin-import | ^2.28.1 |
| eslint-plugin-jest | ^27.2.3 |
| husky | ^8.0.3 |
| jest | ^29.6.4 |
| jest-preset-stylelint | ^6.2.0 |
| jest-watch-typeahead | ^2.2.2 |
| lint-staged | ^14.0.1 |
| np | ^8.0.4 |
| npm-run-all | ^4.1.5 |
| patch-package | ^8.0.0 |
| postcss-html | ^1.5.0 |
| postcss-import | ^15.1.0 |
| postcss-less | ^6.0.0 |
| postcss-sass | ^0.5.0 |
| postcss-scss | ^4.0.7 |
| remark-cli | ^11.0.0 |
| sugarss | ^4.0.1 |
| typescript | ^5.2.2 |
Keywords
css-in-js
css
less
lint
linter
markdown
sass
scss
stylelint
sugarss
