npm / stylelint
stylelint
What changed in stylelint 10 to 18, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-04.
112 breaking1 security6 deprecations64 new APIs and options25 performance16 behavior and defaults8 tooling129 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initstylelint 1859 changes
Breaking changes 28
The latest standard config now turns on this rule.
Built-in formatters use the color option to force color on or off rather than checking process arguments. When unset, FORCE_COLOR takes precedence over NO_COLOR, and NODE_DISABLE_COLORS or FORCE_COLOR=0 disables colors.
Support for filename-less and extension-less CommonJS-style locator paths was removed.
The context.fix property was removed.
The deprecated property is removed; plugins should pass a fix callback to the report utility and set meta.fixable to true.
The declaration-block-single-line-max-declarations rule was removed.
The deprecated propertiesSyntax option is removed; use the shared languageOptions configuration property instead.
The rule no longer supports *syntax options.
The deprecated typesSyntax option is removed; use the shared languageOptions configuration property instead.
The rule no longer reports values that cannot be parsed or invalid math expressions; enable value-no-invalid to keep reporting these problems.
Locator paths no longer support CommonJS-style filename-less or extension-less paths; configs must use full paths.
Packages are no longer resolved from npm's global node_modules directory; install packages used by the config locally or resolve them explicitly.
Separate the --fix value with = instead of a space; otherwise the value is read as a file path.
When color is unset, FORCE_COLOR takes precedence over NO_COLOR; the color option and its flags take precedence over these environment variables.
The rule uses the CSSTree Syntax Reference for known functions and ignores vendor-prefixed functions.
Resolution of packages from the global node_modules directory was removed.
The flag now supports only braceExpansion, caseSensitiveMatch, dot, extglob, followSymbolicLinks and ignore.
globbyOptions now supports only a subset of options.
The string and verbose formatters add hyperlinks in any terminal except in CI or on Windows outside Windows Terminal; detection no longer depends on color, FORCE_HYPERLINK or a known-terminal list.
Support for Node.js versions less than 22.22.2, 24.15.0 and 26.0.0, including end-of-life 20.x, 23.x and 25.x, was removed.
Plugin locator paths no longer support CommonJS-style filename-less or extension-less paths; configs must use full paths.
Plugins can access the PostCSS version Stylelint uses from the result object, avoiding cross-version node rebuilding.
The ignoreSelectors option was removed.
The latest standard config now turns on this rule.
The latest standard config now turns on this rule.
The latest standard config now turns on this rule.
The CLI now parses arguments with node:util.parseArgs, accepting fewer flag spellings. Use long kebab-case flags, separate short-flag values with a space, attach --fix values with =, and use --no- forms for false boolean flags.
TypeScript configs are loaded by Node.js built-in type stripping instead of the typescript package. Only erasable syntax is supported; use import type and replace syntax such as enum and namespace.
New APIs and options 8
Added the at-charset-rule-no-invalid rule.
Color detection now uses the new color option with node:util.styleText.
Added the declaration-property-custom-property-allowed-list rule.
The rule now supports languageOptions.syntax.
Added the result.stylelint.postcss property for plugins.
Added the stylelint.version property.
Added the value-no-invalid rule.
Added the experimental value-type-custom-property-required-list rule.
Performance 3
Import and cache performance improved by replacing file-entry-cache.
Import performance improved by lazily loading css-tree.
Performance for referenceFiles was fixed.
Behavior and default changes 7
Colors are off when this environment variable is set.
Stable support for the processors configuration property was added.
Stable support for the referenceFiles configuration property was added.
The latest standard config turns on this rule.
The latest standard config turns on this rule.
The latest standard config turns on this rule.
TypeScript config files are now loaded by Node.js's built-in type stripping.
Tooling 1
The CLI now parses arguments with node:util.parseArgs.
Fixes and other changes 12
Fixed false negatives for var() values.
Fixed the Config['extends'] type for configuration objects.
Fixed false negatives for custom properties defined in referenceFiles.
Fixed false positives for recently introduced properties.
Fixed false positives and negatives for @property with a list of names.
Fixed false negatives for contain-intrinsic-size.
Fixed false negatives for contain-intrinsic-size and for flow-relative properties overridden by physical shorthands.
Fixed false negatives for values containing known or registered custom properties, and false positives and negatives for files in a referenceFiles bundle.
The rule now substitutes declared custom-property values before checking declarations, fixing false negatives. For registered custom properties, it uses values matching the registered syntax or a value of that syntax.
Fixed the exit code when all errors in a file are suppressed and other problems are reported.
Fixed --fix for files where the only change is removal of a byte order mark.
Fixed false negatives for physical shorthand properties.
stylelint 17165 changes
Breaking changes 52
The propertiesSyntax option was deprecated; use the shared languageOptions configuration property instead.
The typesSyntax option was deprecated; use the shared languageOptions configuration property instead.
Vendor-prefix and case handling is now consistent with other list rules and ignore options; regex support was added.
Vendor-prefix and case handling is now consistent with other list rules and ignore options; regex support was added.
The selector-max-id option has been removed because checking context functional pseudo classes is now the rule's default behaviour.
The CommonJS Node.js API was removed.
The CommonJS Node.js API has been removed; use the ESM API and update config locators to full paths.
The notes suggest this community-maintained package as an alternative to the removed GitHub formatter.
The rule now behaves consistently for vendor prefixes.
The rule now checks properties as-is rather than also checking prefixed ones; configure the prefixed properties you want to check.
Vendor-prefix and case handling is now consistent with other list rules and ignore options.
Vendor-prefix and case handling is now consistent with other list rules and ignore options.
Vendor-prefix and case handling is now consistent with other list rules and ignore options.
Vendor-prefix and case handling is now consistent with other list rules and ignore options.
The default
fixmode changed tostrict.Using fix=false to turn off fixing is no longer supported; remove the flag entirely instead.
The default fix mode is now strict, which fixes problems only when the source has no syntax errors; use --fix=lax to restore the previous behaviour.
Vendor-prefix and case handling is now consistent with other list rules and ignore options.
Vendor-prefix and case handling is now consistent with other list rules and ignore options.
The GitHub formatter was removed.
The built-in GitHub formatter has been removed; use a community formatter such as @csstools/stylelint-formatter-github.
Rules now behave consistently for vendor prefixes and case.
Vendor-prefix and case handling is now consistent with other list rules and ignore options.
The rule calculates specificity for standard CSS nesting according to the CSS Nesting specification; nonstandard nesting users should turn it off.
The rule's behavior changed for standard CSS nesting.
The rule resolves selectors according to standard nesting before checking them; users of nonstandard nesting should turn it off.
Support for Node.js versions less than 20.19.0 has been removed.
The
outputproperty was removed from the resolved object returned by the Node.js API.Support for Node.js versions earlier than 20.19.0 was removed.
The resolved result no longer has the deprecated output property; use result.code for fixed code and result.report for formatted problems.
Vendor-prefix and case handling is now consistent with other list rules and ignore options.
Vendor-prefix and case handling is now consistent with other list rules and ignore options.
The rule now checks properties as-is when applying ignoreProperties; configure the prefixed property names you want to ignore.
report now throws for ambiguous position arguments; plugins must provide a node and complete valid position or index ranges.
The selector-class-pattern option has been removed because it is incompatible with standard CSS Nesting.
The
resolveNestedSelectorsoption was removed.The rule now accounts for standard CSS nesting and modern functional pseudo-classes, linting selectors as written without desugaring nesting or separately evaluating functional pseudo-classes.
The rule no longer desugars nesting or evaluates functional pseudo-classes separately; configured maximums may need to increase.
The rule no longer desugars nesting or evaluates functional pseudo-classes separately, so source selectors are linted as-is.
The rule no longer desugars nesting or evaluates functional pseudo-classes separately, so source selectors are linted as-is.
The rule now accounts for standard CSS nesting and modern functional pseudo-classes, linting selectors as written without desugaring nesting or separately evaluating functional pseudo-classes.
The
checkContextFunctionalPseudoClassesoption was removed.The rule no longer desugars nesting or evaluates functional pseudo-classes separately, so source selectors are linted as-is.
The rule calculates specificity for standard CSS nesting according to the CSS Nesting specification; configured maximum specificity may need adjustment.
The rule no longer desugars nesting or evaluates functional pseudo-classes separately, so source selectors are linted as-is.
The rule now accounts for standard CSS nesting and modern functional pseudo-classes, linting selectors as written without desugaring nesting or separately evaluating functional pseudo-classes.
The rule resolves selectors according to standard nesting before checking them; users of nonstandard nesting should turn it off.
Vendor-prefix and case handling is now consistent with other list rules and ignore options.
Vendor-prefix and case handling is now consistent with other list rules and ignore options.
Vendor-prefix and case handling is now consistent with other list rules and ignore options.
Vendor-prefix and case handling is now consistent with other list rules and ignore options.
The rule now checks values as-is when applying ignoreValues; configure the prefixed values you want to ignore.
Deprecations 1
The rule's *syntax options are deprecated.
New APIs and options 23
Adds the ignoreFunctions option to color-named.
Adds the ignoreFunctions option to color-no-hex.
Adds the selector-no-unmatchable rule.
Adds autofixed to the result object.
Adds a loader property to experimental referenceFiles for cases where the order of appearance in reference styles matters.
Added the selector-no-invalid rule.
Added the unit-layout-mappings rule to enforce logical or physical properties, units and keywords.
Added the value-keyword-layout-mappings rule to enforce logical or physical properties, units and keywords.
Adds an experimental Node.js API option for cancellation support.
Adds maxWarnings to the configuration object.
Adds an experimental configuration property that makes the no-unknown-animations, no-unknown-custom-media and no-unknown-custom-properties rules more useful.
Adds the languageOptions.directionality configuration property.
Adds the property-layout-mappings rule.
Adds the relative-selector-nesting-notation rule.
Adds the selector-no-deprecated rule.
Supports extending units in languageOptions; the extended units apply to rules such as declaration-property-value-no-unknown.
Adds the
ignoreMediaFeatureNameValuesoption.Adds the ignoreAtRules option, defaulting to an empty array, to let developers ignore at-rules.
Adds the ignoreMediaFeatureNames option, defaulting to an empty array, to let developers ignore media feature names.
Adds the display-notation rule. The release notes say its options have not yet been chosen for the standard config.
The
exceptoption now acceptsafter-block.The
exceptoption now acceptsafter-block.The rule now supports the
ignoreSelectorssecondary option.
Performance 22
Improved the performance of getting module paths.
TIMING is dynamically imported only when used, improving performance.
Improves the performance of *-empty-line-before rules.
Improves the performance of no-irregular-whitespace.
Improves the performance of selector cloning rules.
The rule's performance was improved.
The rule's performance was improved.
Improves the performance of declaration-property-value-no-unknown.
The rule's performance was improved.
Performance of
*-listrules was improved.The rule's performance was improved.
Performance of
*-notationrules was improved.Rule sequencing performance was improved.
Performance of
selector-max-*rules was improved.The rule's performance was improved.
The rule's performance was improved.
The rule's performance was improved.
The rule's performance was improved.
Performance of config augmentation and module imports was fixed, contributing to faster execution and lower memory use on larger codebases.
Performance of config override matching was fixed, contributing to faster execution and lower memory use on larger codebases.
Performance of config resolution was fixed, contributing to faster execution and lower memory use on larger codebases.
Performance of rule resolution was fixed, contributing to faster execution and lower memory use on larger codebases.
Behavior and default changes 2
Syntax rules now account for standard CSS nesting and modern functional pseudo-classes.
Semantic rules now account for standard CSS nesting.
Tooling 2
Version 1.0.0 is available to help with first-time Stylelint setup.
The Stylelint Language Server has its first release.
Fixes and other changes 63
Fixes false negatives for uppercase property names.
Fixes false negatives for uppercase units.
Fixes false positives for anchor positioning.
Fixes autofix behavior for the font shorthand.
Fixes false positives for interpolated inline expressions.
Fixes false negatives for pseudo-elements, combinators and nested :has().
Autofix no longer produces an invalid background shorthand when background-size is present.
The quiet option now suppresses report* warning reports.
Fixed the reported range of unknown rules.
Fixed false positives for shared-line comments when
except: ["after-single-line-comment"]is configured.Fixed false negatives for unspaced + and - operators following a * or / operator.
Fixes false negatives for interleaved non-consecutive duplicate properties when ignore is set to consecutive-duplicates(-*).
Fixes false positives for nested selectors.
Fixes false positives for install.
Fixed range reporting when using comments.
Fixed false negatives for custom properties defined in reference files.
Fixes false positives for
caption-side.Fixed
node_modulesignore behavior forcodeFilenamepaths containing a dot-prefixed directory.Fixed the rule's range for contiguous redundant longhand properties.
Fixed inconsistent error messages when a module is not found.
Fixed false negatives for property names in declaration values.
Fixed false positives for @page properties.
Fixed false positives for nested webkit-scrollbar parts.
Fixed a regression that caused ConfigurationError for custom syntaxes.
Fixed autofix for
page-break-*: always.Fixed false positives for
::part().Avoids false positives when URLs have modifiers.
The CLI flag now hides internal properties.
Problem messages are clearer by removing filler words and leading with the problem.
Avoids false positives for
:has().Fixes missing ruleMetadata when linting multiple files with overrides.
node_modulesis now ignored whencodeFilenameis used in the Node.js API.Fixes TS7016 for imported
css-treetypes.The rule no longer reports false positives for function arguments.
The rule no longer reports false positives for
calc-size()containing thesizekeyword.The rule no longer misses equivalent compound selectors.
The rule no longer reports false positives for
@mixinand@scope.The rule no longer misses cases involving
types.Fixes false negatives for at-rule descriptors.
Fixes false positives for corner-shape.
Fixes false positives for double-slashed properties.
The rule no longer misses math functions inside non-math functions.
The rule no longer reports false positives for
calc()with mixed operations.The rule now reports correct ranges for multiple math functions.
The rule no longer reports false positives for a mix of tabs and spaces.
Fixed false negatives for math functions.
Fixed false negatives for matching escaped selectors.
Fixed false negatives for layers with blocks.
Fixed resolution of configs, plugins, processors, and custom syntaxes in Yarn PnP environments.
Fixes TypeScript errors involving GlobbyOptions.
Fixes false negatives and positives for relative colors.
Fixes false negatives for relative colors.
Fixed false positives for declarations within feature-value-blocks.
Fixed false negatives for short and long combinations.
Fixed Windows drive letter casing inconsistencies when matching patterns against file paths.
Fixed false positives for namespaced dollar variables and range context queries.
Fixed false positives for CSS-in-JS.
Fixed false negatives for embedded blocks.
Rules now behave consistently for their
ignore*secondary options.The handling of provided position arguments is now consistent and predictable.
Fixed false negatives for
:is/where().Fixed false positives for MathML 4 tags.
CLI help now includes TypeScript config files.
stylelint 1633 changes
Breaking changes 10
CLI flag errors now exit with code 64 instead of 2, reserving 2 for lint problems.
The CLI prints problems to stderr instead of stdout; with
--fixand--stdin, fixed code goes to stdout and problems to stderr.The 76 rules deprecated in 15.0.0 were removed.
Support for Node.js versions below 18.12.0 has been removed; use Node.js 18.12.0 or higher.
Autofixing always uses
postcss-safe-parser, regardless of file extension.Deprecated stylistic rules have been removed; remove them from configuration.
Every formatter is now a Promise function and must be awaited.
Every rule is now a Promise function and must be awaited.
The function is now async and must be awaited.
Internal files now use
.mjsand.cjsextensions; plugins requiring internal files must update their paths, though access will be removed in the next major release.
Deprecations 2
The CommonJS Node.js API is deprecated and will be removed in the next major release; using it triggers a deprecation warning.
The resolved object's
outputproperty is deprecated in favor ofreportandcodeand will be removed in the next major version.
New APIs and options 9
Supports a function export for customSyntax.
Custom formatters can now be created as ECMAScript modules.
Custom syntaxes can now be created as ECMAScript modules.
A package.json exports field was added for conditional ESM and CommonJS exports.
Use this flag to write output to a file instead of redirecting standard output.
Plugins can now be created as ECMAScript modules.
This option hides the deprecation warning when using the CommonJS Node.js API.
The resolved object now has a
codeproperty containing autofixed code; it is always undefined when linting files.The resolved object now has a
reportproperty containing formatted problems.
Behavior and default changes 2
Promise-returning formatter functions are now supported.
The severity secondary option now supports a function.
Tooling 2
A package using
node:testis available for testing rules; its coverage support is experimental.TypeScript definitions for ESM changed.
Fixes and other changes 8
Fixes false positives for
@function.Fixes false positives for
attr(),if()and custom functions.Fixes false positives when URLs require quoting.
Fixes false positives for the latest CSS specifications by integrating CSS syntax patches.
Fixes false positives for
::scroll-button().Fixes false positives for style query in the if() function.
The CLI now avoids producing different outputs for empty files and empty stdin.
The CLI no longer waits for stdin when there is no input.
stylelint 1521 changes
Breaking changes 4
Removes support for Node.js 12; use Node.js 14.13.1, 16.0.0, or 18.0.0 or higher.
Changes overrides.extends to merge rather than replace, consistent with overrides.plugins.
Removes the processors configuration property. Use a library-specific or syntax-specific custom syntax instead.
The
syntaxoption has been removed.
Deprecations 2
Warnings are now emitted for deprecated rules.
Seventy-six rules enforcing stylistic conventions are deprecated. They still work in this release but emit deprecation warnings and are planned for removal in the next major release.
New APIs and options 6
The rule now accepts message arguments.
Adds a rule that flags property-value pairs unknown in CSS specifications, with secondary options for ignoring or extending property and value syntaxes.
The rule now provides an autofix.
A new rule is available to allow-list media feature name units.
The rule now accepts
ignore: ["custom-elements"].The rule now accepts an
ignoreFunctionsoption, defaulting to an empty list.
Tooling 2
Type definitions have been reorganized.
Type names have been made more consistent.
Fixes and other changes 7
False positives for
@scroll-timelineare fixed.False positives for interpolation and backticks in CSS-in-JS are fixed.
False positives for named timeline ranges are fixed.
The config option now allows basename glob patterns.
False negatives for newer custom syntaxes are fixed.
False positives for the
neveroption are fixed.The autofix for the
simpleoption is fixed.
stylelint 1427 changes
Breaking changes 3
The
configOverridesoption has been removed.The
function-calc-no-invalidrule has been removed.Node.js 10 is no longer supported.
Security 1
A ReDoS issue with regex in
indentationwas addressed.
New APIs and options 10
The
color-hex-alpharule has been added.The
custom-property-no-missing-var-functionrule has been added.The configuration object now supports a
customSyntaxoption.The rule now provides an autofix.
The rule now supports the
ignoreFunctionsoption.The rule now supports the
ignoreAtRulesoption.The rule now supports the
ignorePropertiesoption.The configuration object now supports an
overridesproperty.The Node.js API now supports a
quietoption.The
rulesproperty in the configuration object now supportsdisableFixas a secondary option.
Behavior and default changes 1
The
ignoreFilesoption can now be extended.
Tooling 1
TypeScript type definitions have been added.
Fixes and other changes 11
Fixed the “No files matching the pattern” issue when using backslash paths on Windows.
Problem messages are now consistent with other
*-quotesrules.Fixed false positives for the
flexproperty.Fixed autofix for Less comments.
Fixed false positives for
prefers-contrast.Fixed false positives for
dynamic-rangeandvideo-dynamic-range.Fixed a TypeError for spaceless conditions.
Fixed false negatives for
gridandgrid-templateshorthand properties.Fixed false positives for Less maps.
Fixed false positives for Less parametric mixins.
Fixed false positives for nested property declarations.
stylelint 1311 changes
Breaking changes 3
Types declarations for Flow were removed.
Globs should use only forward-slashes as directory separators; Windows users might need to update their globs.
Node.js 8.x support was removed; Node.js 10 is now required, with support guaranteed on its latest release.
Behavior and default changes 1
The rule now supports the
xunit.
Fixes and other changes 7
Fixed an edge case involving overlapping disabled ranges.
Fixed false negatives for multiple spaces.
Fixed a crash when no rules are specified.
Fixed false positives for SVG tags.
Selectors are now consistently checked for standard syntax before being passed to the parser.
Fixed false positives for Sass map keys.
Fixed false positives for shared-line comments.
stylelint 128 changes
Breaking changes 2
Stylelint no longer ignores the bower_components folder by default.
The createRuleTester API was removed.
Fixes and other changes 6
Fixed the incorrect error message shown when parsing files with broken syntax.
Fixed false positives for Sass variables with namespaces.
Fixed false positives for font-weight ranges in @font-face.
Fixed false positives for line-height and fr units.
Fixed false positives for Less variables.
Fixed false negatives for rules with nested rules.
stylelint 1121 changes
Breaking changes 4
These rules now report only one violation per function, selector, or value list.
The value returned for stylelintError is now always a boolean.
The PostCSS plugin no longer ignores .stylelintignore.
Each file now displays a violation at 1:1 instead of throwing an error when rules are unrecognised.
Deprecations 1
The createRuleTester API is deprecated.
New APIs and options 5
The rule gained ignore: ["selectors-within-list"].
The rule gained the ignoreSelectors option.
A CLI flag for reporting invalid scope disables was added.
The selector-pseudo-element-case rule gained autofix support.
The unicode-bom rule was added.
Behavior and default changes 3
The max-empty-lines rule gained autofix support.
The flag now reports needless disables and runs linting.
Selector rules now support all logical combinations, including :matches and :has.
Fixes and other changes 8
The rule no longer crashes for @import statements.
Babel user configuration no longer interferes with the CSS-in-JS parser.
False positives for <style> tags with multiline attributes were fixed.
False positives inside calc functions were fixed.
False positives for multi-line url() were fixed.
False positives for selectors in the same selector list were fixed.
False positives for Less at-variables starting with numbers were fixed.
The rule was fixed for overflowX in CSS-in-JS.
stylelint 1016 changes
Breaking changes 6
Use this flag to preserve the old behavior when a glob matches no files.
Stylelint now throws an error if a glob matches no files.
The
jsxsyntax option was removed and replaced withcss-in-jsin v9.10.0.Node.js 6.x support was removed; Node.js 8.15.1 or greater is now required.
Rules are now applied in the order defined in
lib/rules/index.js.The
styledsyntax option was removed and replaced withcss-in-jsin v9.10.0.
New APIs and options 3
Added the
at-rule-property-requirelistrule.Added
ignore: ["comments"]toblock-no-empty.Added the
disallowInListoption tono-duplicate-selectors.
Fixes and other changes 7
Fixed false negatives for CSS-in-JS.
Fixed false negatives in declaration-based rules for CSS-in-JS.
Fixed false positives for
prefers-color-scheme.Fixed false positives for negative numbers.
Fixed false positives for vendor prefixed pseudo-elements.
Fixed false negatives for nested at-rules.
Fixed autofix for single-line comments within maps.