Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

stylelint

> 前端框架
Open source

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

11.5K stars0 likes3 views
WebsiteGitHub

About

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

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
    • Getting started
    • Customizing
    • Configuring
    • Rules
    • Ignoring code
    • CLI
    • Node.js API
    • PostCSS plugin
    • Options
    • Errors & warnings
  • Developer guide
    • Writing plugins
    • Writing custom syntaxes
    • Writing custom formatters
  • Migration guide
    • Migrating to 17.0.0
    • Migrating to 16.0.0
    • Migrating to 15.0.0
    • Migrating to 14.0.0
  • Contributor guide
    • Contributing
    • Writing rules
    • Writing system tests
    • Benchmarking
  • Maintainer guide
    • Managing issues
    • Managing pull requests
    • Performing releases
  • About
    • Vision
    • Governance
    • Semantic versioning
    • Support
  • Changelog

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, backers and donors

Financial contributions help us dedicate time to Stylelint and cover our infrastructure costs.

A big thank you to everyone who sponsors us on Open Collective:

And thank you to all our Open Collective backers, GitHub sponsors and one-off donors.

Contribute via Open Collective or sponsor us on GitHub.

Website hosting

License

The MIT License.

Issues· 140 open

View all issuesOpen on GitHub
  • #9456

    Remove `declaration-block-single-line-max-declarations`

    status: agreed but heldUpdated Sep 28, 2026
  • #9464

    Fix `declaration-property-value-no-unknown` false negatives for values containing known custom properties

    status: wipUpdated Sep 28, 2026
  • #9339

    Refactor to replace picocolors with `node:util.styleText`

    status: wipUpdated Sep 25, 2026
  • #9418

    Fix `declaration-block-no-shorthand-property-overrides` false negatives for logical properties and physical shorthands

    status: needs investigationUpdated Sep 25, 2026
  • #9527

    Fix exit code 2 when every error in a file is suppressed and anything else is reported

    Updated Sep 23, 2026
  • #9525

    Fix `Config` type to accept configuration objects in `extends`

    Updated Sep 23, 2026
  • #9511

    Fix `at-rule-prelude-no-invalid` `Bad syntax reference` throw for `@when` and `@else`

    status: ready to implementUpdated Sep 22, 2026
  • #3935

    Add support for running in a browser

    status: ask to implementUpdated Sep 20, 2026
  • #9510

    Fix `--fix` not writing a file whose only change is the removal of its byte order mark

    status: ready to implementUpdated Sep 15, 2026
  • #7492

    Add `at-charset-rule-no-invalid`

    status: wipsubtype: new ruleUpdated Sep 13, 2026

> Tags

JavaScriptcssenforce-conventionslintlinter

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 28, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架