A mighty, modern CSS linter that helps you enforce consistent conventions and avoid errors in your stylesheets.
Upgrading? Please read our CHANGELOG to learn what changes to expect in the latest version, whether that's new features, bug fixes, renamed rules, or whatever else.
Over one hundred and forty rules: Including those that:
With stylelint, it's easy to start linting your CSS:
Decide how you want to use stylelint:
Create your configuration object by either extending a shared config or crafting your own:
stylelint-config-standard. It includes over 80 of stylelint's rules with sensible defaults. (You can always override specific rules after extending the config.) We update the config with each new release of stylelint. Alternately, you can search for a community config and extend that instead.
To craft your own config, first learn about how rules are named and how they work together, then either:
null) the rules that you don't care to enforce.
Be sure to specify the syntax if you're using non-standard syntax (e.g. SCSS, SugarSS or Less).
You'll find more detailed information on using stylelint and tailoring it to your needs in our guides:
There is always a lot of work to do, and already well over 100 rules to maintain. So please help out in any way that you can:
There is also stackoverflow, which is our preferred QA forum. Tag your post with "stylelint".