Skip to content

A mighty CSS linter that helps you avoid errors and enforce conventions.

License

Notifications You must be signed in to change notification settings

jondricek/stylelint

This branch is 16 commits ahead of, 156 commits behind stylelint/stylelint:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d873e55 · Jan 2, 2025
Jan 2, 2025
Nov 18, 2024
Jul 22, 2024
Oct 19, 2023
Jan 2, 2025
Nov 11, 2021
Jan 2, 2025
Dec 30, 2024
Dec 30, 2024
Aug 21, 2024
Jan 2, 2025
Jun 5, 2023
Sep 21, 2019
Jul 30, 2015
Mar 8, 2024
Oct 13, 2019
May 28, 2024
Feb 18, 2016
Jan 1, 2025
May 24, 2024
Jan 1, 2018
Dec 28, 2024
Jan 25, 2023
Feb 7, 2022
Oct 27, 2024
Jan 17, 2022
Nov 6, 2023
Jan 2, 2025
Jan 1, 2025
Jan 2, 2025
Jan 2, 2025
Jun 24, 2024

Repository files navigation

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.

Alumni

We'd like to thank all past members for their invaluable contributions, including two of Stylelint's co-creators @davidtheclark and @MoOx.

Sponsors

Thank you to all our sponsors! Become a sponsor.

Backers

Thank you to all our backers! Become a backer.

Website hosting

Deploys by Netlify

License

The MIT License.

About

A mighty CSS linter that helps you avoid errors and enforce conventions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.2%
  • CSS 0.5%
  • TypeScript 0.2%
  • SCSS 0.1%
  • HTML 0.0%
  • Shell 0.0%