OSS TanbouSign in with GitHub

continuously check CSS errors and conventions with 100+ rules, plugins, and shareable configs

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
11,526
Primary language
JavaScript
License
MIT
Repository last updated
Oct 1, 2026
On this page

Overview

Stylelint is a CSS linter that detects syntax errors, duplicate selectors, unknown properties, and project-specific convention violations. It supports plugins, shareable configs, autofix, and custom syntaxes.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Detect modern CSS problems with more than 100 built-in rules

Rules cover invalid, unknown, or problematic CSS as well as naming, notation, selector limits, and other conventions.

Sources: [1]

Extend projects with plugins, shareable configs, and custom syntaxes

Teams can add custom rules, reuse configuration packages, and lint SCSS, Sass, Less, and other CSS-like syntaxes through adapters.

Sources: [1]

Autofix supported problems

CLI and API workflows can fix eligible issues automatically, with version 17 changing the default fix mode to strict.

Sources: [1][3]

Best fit

Fits teams that want one CSS quality policy across editors, pre-commit checks, and CI

Rules and configs can be version-controlled and reused so local tooling and CI enforce the same stylesheet standards.

Sources: [1]

Before adoption

Version 17 requires ESM integration and Node 20.19.0 or later

Stylelint 17 removed the CommonJS Node.js API and support for Node versions below 20.19.0, requiring older integrations to migrate.

Sources: [3][2]

Keep linting separate from formatting responsibilities

The README recommends using a pretty printer such as Prettier alongside Stylelint because formatting and lint-rule enforcement are complementary concerns.

Sources: [1]

Official sources

  1. [1]Stylelint 17.16.0 README(2026-10-05)
  2. [2]Stylelint 17.16.0 package metadata(2026-10-05)
  3. [3]Stylelint v17 migration guide(2026-10-05)
  4. [4]Stylelint 17.16.0 changelog(2026-10-05)
  5. [5]Stylelint 17.16.0 release(2026-10-05)
  6. [6]Stylelint MIT license(2026-10-05)
Supplemental curator note

Stylelint 17 removes the CommonJS Node.js API and is ESM-oriented. It requires Node 20.19.0 or later, and the default --fix mode changed to strict, so older integrations should follow the v17 migration guide.

Try it in 3 steps

  1. 1

    Install Stylelint 17.16.0 in an isolated project

    Pin version 17.16.0 on Node.js 20.19.0 or later.

    demo=$(mktemp -d "${TMPDIR:-/tmp}/stylelint.XXXXXX") && cd "$demo" && npm init -y >/dev/null && npm install --save-exact --save-dev stylelint@17.16.0
  2. 2

    Create a rule config and CSS with a violation

    Use a built-in rule and an invalid hex color to create a deterministic lint failure.

    printf "%s\n" "export default {" " rules: {" " 'color-no-invalid-hex': true" " }" "};" > stylelint.config.mjs && printf "%s\n" '.bad { color: #12zzzz; }' > input.css
  3. 3

    Run the CLI and confirm the lint error

    Confirm Stylelint returns a non-zero status for the violation so the same check can fail CI.

    if npx stylelint input.css; then exit 1; else echo "lint error detected"; fi
Check the official README

Growth

Growth trends · Last 30 days

11,526 Stars

Trend data is still being collected.

Built with

Categories and tags

Categories

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • css
  • enforce-conventions
  • lint
  • linter
  • postcss
Stars
11,526
Forks
1,024
Watchers
90
Open issues
144
Owner type
Organization
Primary language
JavaScript
License
MIT
Repository last updated
Oct 1, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?