{
 "id": "epqbq24t57",
 "slug": "stylelint",
 "title": "Stylelint",
 "updated": "2026-10-15",
 "topic_path": [
  {
   "id": "technology",
   "label": "Technology and the built world",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology"
  },
  {
   "id": "technology.computing",
   "label": "Computing and digital systems",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing"
  },
  {
   "id": "technology.computing.software",
   "label": "Software and programming",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.software"
  },
  {
   "id": "technology.computing.software.named_products_platforms",
   "label": "Named software products and platforms",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.software.named_products_platforms"
  },
  {
   "id": "technology.computing.software.named_products_platforms.static-analysis-and-code-quality-tools",
   "label": "Static analysis and code quality tools",
   "api_url": "https://www.edgepedia.org/api/v1/topics/technology.computing.software.named_products_platforms.static-analysis-and-code-quality-tools"
  }
 ],
 "geo": [
  {
   "id": "geo.us.t2001.technology.computing.software.named_products_platforms",
   "label": "United States · 2001 to 2020: Named software products and platforms",
   "api_url": "https://www.edgepedia.org/api/v1/geo/geo.us.t2001.technology.computing.software.named_products_platforms",
   "path": [
    {
     "id": "geo.us",
     "label": "United States",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.us"
    },
    {
     "id": "geo.us.t2001",
     "label": "United States · 2001 to 2020",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.us.t2001"
    },
    {
     "id": "geo.us.t2001.technology",
     "label": "Technology and the built world",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.us.t2001.technology"
    },
    {
     "id": "geo.us.t2001.technology.computing",
     "label": "Computing and digital systems",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.us.t2001.technology.computing"
    },
    {
     "id": "geo.us.t2001.technology.computing.software",
     "label": "Software and programming",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.us.t2001.technology.computing.software"
    },
    {
     "id": "geo.us.t2001.technology.computing.software.named_products_platforms",
     "label": "Named software products and platforms",
     "api_url": "https://www.edgepedia.org/api/v1/geo/geo.us.t2001.technology.computing.software.named_products_platforms"
    }
   ]
  }
 ],
 "excerpt": "Stylelint is an open-source linter for CSS and CSS-like languages such as SCSS and Less, with over 100 built-in rules, plugin support, and automatic fixing, first released in 2014.",
 "snippet": "Stylelint is an open-source linter for CSS and CSS-like languages such as SCSS and Less, with over 100 built-in rules, plugin support, and automatic fixing, first released in 2014.",
 "node": "technology.computing.software.named_products_platforms.static-analysis-and-code-quality-tools",
 "markdown": "# Stylelint\n\n**Stylelint** is a linter for CSS and CSS-like languages, distributed under the MIT license, that checks stylesheets against configurable rules for errors and stylistic conventions<sup>[1](https://stylelint.io/)</sup><sup> • </sup><sup>[2](https://www.npmjs.com/package/stylelint)</sup>. It ships with over 100 built-in rules for modern CSS syntax and features, supports plugins for custom rules, can automatically fix problems where possible, and supports shareable configs<sup>[1](https://stylelint.io/)</sup>. The npm package records about 10.9 million weekly downloads and more than 3,200 dependent packages<sup>[2](https://www.npmjs.com/package/stylelint)</sup>, and the project's site states it is trusted by companies worldwide such as Google and GitHub<sup>[1](https://stylelint.io/)</sup>.\n\n| Key fact | Detail |\n|---|---|\n| What it is | A CSS linter, MIT-licensed, with over 100 built-in rules for modern CSS<sup>[1](https://stylelint.io/)</sup><sup> • </sup><sup>[2](https://www.npmjs.com/package/stylelint)</sup> |\n| Parsing | Built on PostCSS, which parses any CSS-like syntax into an abstract syntax tree for rules to analyze<sup>[3](https://css-tricks.com/stylelint/)</sup> |\n| Language support | SCSS, Sass, Less, and SugarSS through PostCSS custom parsers; embedded styles in HTML, Markdown, and CSS-in-JS template literals<sup>[1](https://stylelint.io/)</sup> |\n| Autofix | Automatically fixes problems where possible; since v17 the default fix mode is strict, fixing only when the source has no syntax errors<sup>[1](https://stylelint.io/)</sup><sup> • </sup><sup>[4](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-17.md)</sup> |\n| Adoption | 10,917,750 weekly npm downloads and 3,238 dependents at version 17.16.0<sup>[2](https://www.npmjs.com/package/stylelint)</sup> |\n| Shared configs | stylelint-config-standard extends stylelint-config-recommended and turns on additional rules enforcing conventions from the CSS specifications<sup>[5](https://www.npmjs.com/package/stylelint-config-standard)</sup> |\n| History | Package created 11 December 2014; versions 15–17 deprecated and removed stylistic rules, migrated to ESM, and modernized nesting rules<sup>[2](https://www.npmjs.com/package/stylelint)</sup><sup> • </sup><sup>[6](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-16.md)</sup> |\n\n## How it works\n\nStylelint is built on [PostCSS](https://www.edgepedia.org/postcss), which parses any CSS-like syntax into an abstract syntax tree (AST) that plugins can analyze and manipulate<sup>[3](https://css-tricks.com/stylelint/)</sup>. Each built-in rule inspects that tree and reports violations; an academic survey of CSS tooling describes the tool as rule-based, with rules determining what the linter looks for and complains about<sup>[7](https://www.mdpi.com/2078-2489/9/1/17)</sup>.\n\n**Language coverage.** PostCSS parsers exist for SCSS, Less, and SugarSS, giving Stylelint support for those syntaxes<sup>[3](https://css-tricks.com/stylelint/)</sup>. The official site adds that Stylelint can parse CSS-like languages such as SCSS, Sass, Less, and SugarSS, and can extract embedded styles from HTML, Markdown, and CSS-in-JS template literals, so styles written inside [JavaScript](https://www.edgepedia.org/javascript) components can be linted alongside plain stylesheets<sup>[1](https://stylelint.io/)</sup>.\n\n**Autofix.** Stylelint automatically fixes problems where possible<sup>[1](https://stylelint.io/)</sup>; it has a `--fix` flag for automatically fixing issues<sup>[3](https://css-tricks.com/stylelint/)</sup>. Since version 17 the default fix mode is strict: Stylelint only fixes problems when there are no syntax errors in the source, a mode the migration guide describes as safer than the older lax behavior, especially when fixing code that uses nesting<sup>[4](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-17.md)</sup>.\n\n## Rules and configuration\n\nThe built-in rules cover both correctness and convention. They can disallow empty blocks, invalid hex values, duplicate selectors, unknown animation names, and mistaken linear-gradient syntax; cap selector specificity or nesting depth; forbid id selectors; and enforce naming conventions through regular expressions<sup>[3](https://css-tricks.com/stylelint/)</sup>. Specificity rules are a notable example: `no-descending-specificity` and `selector-max-specificity` follow the CSS Nesting specification, in which the nesting selector (`&`) takes the largest specificity among the complex selectors in the parent's selector list, identical to the behavior of `:is()`<sup>[4](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-17.md)</sup>.\n\n**Shared configs.** Configuration is layered through shareable configs<sup>[1](https://stylelint.io/)</sup>. Building on stylelint-config-recommended, the default stylelint-config-standard activates extra rules that enforce contemporary conventions from the CSS specifications and from Baseline Widely Available; to override or extend these settings, users place their own adjustments under a `rules` key in their config.<sup>[5](https://www.npmjs.com/package/stylelint-config-standard)</sup> Published shared configs have included those from [WordPress](https://www.edgepedia.org/wordpress) and SUITCSS<sup>[3](https://css-tricks.com/stylelint/)</sup>.\n\n**Custom rules and suppression.** Plugins let users create their own custom rules<sup>[1](https://stylelint.io/)</sup>. Any rule can be turned off completely, or disabled on a stylesheet-by-stylesheet or line-by-line basis where non-standard syntax confuses the rule<sup>[3](https://css-tricks.com/stylelint/)</sup>.\n\n## By the numbers\n\nThe npm record for the stylelint package lists version 17.16.0, the MIT license, 10,917,750 weekly downloads, and 3,238 dependents<sup>[2](https://www.npmjs.com/package/stylelint)</sup>. Snyk's package page records a lower figure, 8,759,161 weekly downloads, and classifies the project's popularity as a Key ecosystem project; both figures indicate a scale of several million downloads per week<sup>[2](https://www.npmjs.com/package/stylelint)</sup><sup> • </sup><sup>[8](https://security.snyk.io/package/npm/stylelint)</sup>. The project site cites 15,000 unit tests as part of its robustness<sup>[1](https://stylelint.io/)</sup>.\n\nFor performance diagnosis, the CLI supports a `TIMING` environment variable that, when set to `all` or a positive integer, displays the execution time of the longest-running rules. In the documented sample run the slowest rule was `no-descending-specificity` at 1.154 ms, 19.3% of rule time<sup>[9](https://stylelint.io/user-guide/cli)</sup>.\n\n## How it compares with ESLint, Prettier, and earlier CSS linters\n\nBefore Stylelint, CSS linting options were limited to the Ruby-based, preprocessor-specific scss-lint and the older CSS Lint; Stylelint was created to fill that gap<sup>[3](https://css-tricks.com/stylelint/)</sup>. Its design deliberately follows ESLint's model of extensibility. Nicholas Zakas, creator of [ESLint](https://www.edgepedia.org/eslint) and also of CSS Lint, wrote that the key to ESLint's success is its extensibility, and Stylelint tries to follow ESLint's lead<sup>[3](https://css-tricks.com/stylelint/)</sup>.\n\n**Prettier.** Stylelint and [Prettier](https://www.edgepedia.org/prettier) overlap on formatting conventions, and because Stylelint reports some formatting conventions as errors the two can clash. The documented resolution is to extend stylelint-config-prettier, which disables the conflicting rules, and to place it last in the `extends` list so its settings are not overwritten<sup>[10](https://blog.logrocket.com/using-stylelint-improve-lint-css-scss-sass/)</sup>. The project itself recommends using a pretty printer like Prettier alongside Stylelint, describing linters and pretty printers as complementary tools<sup>[1](https://stylelint.io/)</sup>. This division of labor became policy in versions 15 and 16, when the stylistic rules were deprecated and then removed<sup>[6](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-16.md)</sup>.\n\n## History and releases\n\nThe npm package was created on 11 December 2014<sup>[2](https://www.npmjs.com/package/stylelint)</sup>, and the standard shared config followed on 11 January 2016<sup>[5](https://www.npmjs.com/package/stylelint-config-standard)</sup>.\n\n**Version 16.** Version 16 removed the stylistic rules deprecated in 15.0.0<sup>[6](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-16.md)</sup>. It also migrated the source code to [ECMAScript](https://www.edgepedia.org/ecmascript) modules (ESM), described as a year-long effort to allow ESM plugins, custom syntaxes, and formatters, and deprecated the CommonJS Node.js API<sup>[6](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-16.md)</sup>. Other changes removed support for Node.js versions below 18.12.0, changed the default syntax behavior to always use the safe parser with `fix` regardless of file extension, changed the Node.js API's returned resolved object, formatters, rules object, and `checkAgainstRule()` function, and changed the CLI to print problems to stderr<sup>[6](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-16.md)</sup>.\n\n**Version 17.** Version 17 modernized dozens of rules related to CSS nesting, specificity, and vendor prefixes<sup>[4](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-17.md)</sup>. It updated the `selector-max-*` rules for standard CSS nesting and modern functional pseudo-classes such as `:is()`, `:where()`, and `:has()`, and no longer desugars nesting in those rules<sup>[4](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-17.md)</sup>. It also removed the `resolveNestedSelectors` option from `selector-class-pattern` because it is incompatible with standard CSS Nesting, which does not concatenate strings<sup>[4](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-17.md)</sup>.\n\nSnyk rates the project's maintenance status as Healthy, with at least one new version released in the past three months at the time of its assessment<sup>[8](https://security.snyk.io/package/npm/stylelint)</sup>.\n\n## Adoption and ecosystem\n\nAdoption is visible at several levels. The stylelint package has 3,238 dependents on npm<sup>[2](https://www.npmjs.com/package/stylelint)</sup>. The project site states that companies worldwide such as Google and GitHub trust it<sup>[1](https://stylelint.io/)</sup>. Practically, Stylelint has integrations for code editors, task runners, and some bundlers, and like ESLint it has built-in rules to catch errors and can automatically fix some of them<sup>[10](https://blog.logrocket.com/using-stylelint-improve-lint-css-scss-sass/)</sup>.\n\n## Limitations and migration cost\n\nSeveral documented pain points affect users of preprocessors and of autofix.\n\n**Specificity rules and nesting.** Users of language extensions with nonstandard nesting, such as SCSS or Less, are advised to turn off the `*-specificity` rules in their config<sup>[4](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-17.md)</sup>, because those rules now assume standard CSS Nesting semantics.\n\n**Autofix safety.** The strict fix mode introduced in v17 refuses to fix when the source contains syntax errors, trading convenience for safety when fixing nested code<sup>[4](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-17.md)</sup>.\n\n**Prettier conflicts.** Formatting rules clash with Prettier unless stylelint-config-prettier is extended last in the config<sup>[10](https://blog.logrocket.com/using-stylelint-improve-lint-css-scss-sass/)</sup>.\n\n**Major-version migration.** Upgrading across majors has carried real work: v16 removed the deprecated stylistic rules, dropped Node.js versions below 18.12.0, changed default syntax behavior with `fix`, and changed the Node.js API's resolved object, formatters, rules object, `checkAgainstRule()`, and stderr output<sup>[6](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-16.md)</sup>; v17 removed the `resolveNestedSelectors` option from `selector-class-pattern` and changed fix behavior<sup>[4](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-17.md)</sup>. The official migration guides are the documented tooling for these upgrades.\n\n## References\n\n1. [Stylelint official site](https://stylelint.io/)\n2. [stylelint, npm](https://www.npmjs.com/package/stylelint)\n3. [Lint your CSS with stylelint, CSS-Tricks](https://css-tricks.com/stylelint/)\n4. [Stylelint 17 migration guide, stylelint GitHub](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-17.md)\n5. [stylelint-config-standard, npm](https://www.npmjs.com/package/stylelint-config-standard)\n6. [Stylelint 16 migration guide, stylelint GitHub](https://github.com/stylelint/stylelint/blob/main/docs/migration-guide/to-16.md)\n7. [CSS Preprocessing: Tools and Automation Techniques, MDPI Information](https://www.mdpi.com/2078-2489/9/1/17)\n8. [stylelint, Snyk](https://security.snyk.io/package/npm/stylelint)\n9. [Command Line Interface (CLI), Stylelint docs](https://stylelint.io/user-guide/cli)\n10. [Level up your CSS linting using Stylelint, LogRocket Blog](https://blog.logrocket.com/using-stylelint-improve-lint-css-scss-sass/)\n\n---\n*Topic: Encyclopedia › Technology and the built world › Computing and digital systems › Software and programming › Named software products and platforms › Static analysis and code quality tools*\n\n*Initially written Oct 15, 2026*\n\n*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*\n\nLicense: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license\n",
 "same_as": [],
 "url": "https://www.edgepedia.org/stylelint",
 "markdown_url": "https://www.edgepedia.org/stylelint.md",
 "license": {
  "name": "Edgepedia Community License 1.0",
  "url": "https://www.edgepedia.org/edgepedia/license",
  "summary": "Free with credit, commercial use included. AI training is open to everyone. For other uses, organizations over USD 100M in revenue or 100M monthly users license separately.",
  "spdx": "LicenseRef-Edgepedia-Community-1.0"
 },
 "credit": "\"Stylelint\", Edgepedia (EdgeChat), https://www.edgepedia.org/stylelint. Edgepedia Community License 1.0.",
 "credit_md": "\"[Stylelint](https://www.edgepedia.org/stylelint)\", Edgepedia (EdgeChat), [https://www.edgepedia.org/stylelint](https://www.edgepedia.org/stylelint). [Edgepedia Community License 1.0](https://www.edgepedia.org/edgepedia/license).",
 "credit_html": "\"<a href=\"https://www.edgepedia.org/stylelint\">Stylelint</a>\", Edgepedia (EdgeChat), <a href=\"https://www.edgepedia.org/stylelint\">https://www.edgepedia.org/stylelint</a>. <a href=\"https://www.edgepedia.org/edgepedia/license\">Edgepedia Community License 1.0</a>.",
 "speakable": "Stylelint is an open-source linter for CSS and CSS-like languages such as SCSS and Less, with over 100 built-in rules, plugin support, and automatic fixing, first released in 2014."
}
