stylelint
A mighty CSS linter that helps you avoid errors and enforce conventions.
Last updated 2 years ago by ybiquitous .
MIT · Repository · Bugs · Original npm
$ cnpm install stylelint 
SYNC missed versions from official npm registry.

Stylelint

npm version Build Status npm downloads

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

Example

Guides

Contributors

Stylelint is maintained by volunteers. Without the code contributions from all these fantastic people, Stylelint would not exist. Become a contributor.

Sponsors

<object data="https://opencollective.com/stylelint/sponsors.svg?width=420&button=false" type="image/svg+xml"> </object>

Thank you to all our sponsors! Become a sponsor.

Backers

<object data="https://opencollective.com/stylelint/backers.svg?width=420&avatarHeight=48&button=false" type="image/svg+xml"> </object>

Thank you to all our backers! Become a backer.

Website hosting

Deploys by Netlify

License

The MIT License.

Current Tags

  • 15.6.0                                ...           latest (2 years ago)

22 Versions

  • 15.6.0                                ...           2 years ago
  • 14.14.1                                ...           3 years ago
  • 14.11.0                                ...           3 years ago
  • 14.13.0                                ...           3 years ago
  • 12.0.1                                ...           6 years ago
  • 14.12.0                                ...           3 years ago
  • 14.8.5                                ...           3 years ago
  • 14.6.0                                ...           3 years ago
  • 13.13.1                                ...           4 years ago
  • 14.0.0-0                                ...           4 years ago
  • 14.3.0                                ...           4 years ago
  • 14.2.0                                ...           4 years ago
  • 6.9.0                                ...           9 years ago
  • 13.12.0                                ...           4 years ago
  • 11.1.1                                ...           6 years ago
  • 13.6.1                                ...           5 years ago
  • 7.8.0                                ...           9 years ago
  • 9.6.0                                ...           7 years ago
  • 7.13.0                                ...           8 years ago
  • 8.4.0                                ...           8 years ago
  • 9.10.1                                ...           7 years ago
  • 10.1.0                                ...           6 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org