Skip to content
A mighty, modern style linter
JavaScript CSS Yacc HTML Vue Shell
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Resolve the ambiguity of the `Node.js` name (#3904) Jan 18, 2019
bin Add system tests for CLI (#2903) Mar 23, 2018
docs Add jest-runner-stylelint to build tool plugins (#4209) Aug 15, 2019
flow-typed chore(package): update flow-bin to version 0.100.0 (#4096) Jun 8, 2019
identity Add stylelint-icon-and-text-white.png (#4039) Apr 18, 2019
lib Support several warnings in tests (#4183) Aug 12, 2019
scripts Fix TypeError with benchmark-rule script (#3979) Mar 16, 2019
system-tests Stop skipping linting when --report-needless-disables is used. Fix #4076 Jul 31, 2019
.editorconfig Prepare docs for #2067 (#2127) Nov 27, 2016
.eslintignore Remove jison-gho dependency (#3915) Jan 19, 2019
.flowconfig Move 3rd party Flow definitions and ignore from package publication (#… Mar 15, 2018
.gitattributes Add png as binary Jul 30, 2015
.gitignore Adding yarn.lock to .gitignore file (#2943) Oct 5, 2017
.npmrc Remove tag version prefix when bumping package version with npm Jun 7, 2019
.prettierignore Remove jison-gho dependency (#3915) Jan 19, 2019
.remarkignore Make remark ignore the .github folder Feb 18, 2016
.travis.yml Add Node.js 12 to CIs (#4072) May 31, 2019 Update Aug 11, 2019 Remove open collective from contributing doc (#3795) Nov 9, 2018
LICENSE Update license date (#3090) Jan 1, 2018 [Docs]: Minor tweaks (#4205) Aug 13, 2019 Fix documentation typos and mistakes (#3922) Apr 4, 2019
appveyor.yml Revert adding Node.js 12 in AppVeyor (#4107) Jun 7, 2019
example.png Optimise example output image Jun 18, 2016
jest-setup.js Support several warnings in tests (#4183) Aug 12, 2019
package.json Update jest-watch-typeahead to the latest version 🚀 (#4215) Aug 21, 2019


NPM version Build Status Build status NPM Downloads Backers on Open Collective Sponsors on Open Collective

A mighty, modern linter that helps you avoid errors and enforce conventions in your styles.


It's mighty because it:

  • understands the latest CSS syntax including custom properties and level 4 selectors
  • extracts embedded styles from HTML, markdown and CSS-in-JS object & template literals
  • parses CSS-like syntaxes like SCSS, Sass, Less and SugarSS
  • has over 170 built-in rules to catch errors, apply limits and enforce stylistic conventions
  • supports plugins so you can create your own rules or make use of plugins written by the community
  • automatically fixes some violations (experimental feature)
  • is well tested with over 10000 unit tests
  • supports shareable configs that you can extend or create your own of
  • is unopinionated so you can tailor the linter to your exact needs
  • has a growing community and is used by Facebook, GitHub and WordPress

Example output


Getting started

It's easy to get started.

First, decide how you want to use stylelint:

Then create your configuration object. You can either extend a shared configuration or craft your own.

Extend a shared configuration

This is the quickest way to get started. We suggest you extend either:

The recommended config turns on just the possible error rules. The standard config extends it by turning on 60 stylistic rules. We suggest you extend the:

  • recommended config if you use a pretty printer like prettier
  • standard config if you want stylelint to enforce stylistic conventions

You may want to add rules to your config that limit language features as these will be specific to your team and/or project.

If you use language extensions, for example @if and @extends, you can use a community config like stylelint-config-recommended-scss instead.

Craft your own config

Alternatively, you can learn about the rules and then either:


You'll find detailed information on customising stylelint in our guides:

Need help?

Read our FAQ first.

If the answer to your problem isn't there, then post it on stackoverflow.

Create a new issue if:

  • you think you've found a bug
  • you have a feature request

If you're upgrading, read our CHANGELOG to learn what changes to expect in the latest version.

Help out

To help out, you can:

Our VISION document guides our work.

Semantic Versioning Policy

We have a semantic versioning policy. Any minor update may report more errors than the previous release. As such, we recommend using the tilde (~) in package.json e.g. "stylelint": "~7.2.0" to guarantee the results of your builds.


The MIT License.

Contributing Guidelines

Check out the Contributing Guidelines.


Without all these wonderful people this project would cease to exist.


Thank you to all our backers! Become a backer.


Support this project by becoming a sponsor. Your logo will show up here with a link to your website. Become a sponsor.

You can’t perform that action at this time.