Releases: torchbox/stylelint-config-torchbox
v5.0.0 - Stylelint 17
5.0.0 (2026-03-09)
Features
- Update stylelint to v17 and up.
- Update all config dependencies to their latest releases, compatible with stylelint v17.
- Switch from
selector-class-patterntoscss/selector-class-patternto retainresolveNestedSelectorssupport (removed from built-in rule in Stylelint 17). - Experimental: new upgrading stylelint AI skill to help automating upgrades of Stylelint and-or shared configurations.
Please share feedback about agent skills if you use this on projects!
BREAKING CHANGES
The configuration now mandates stylelint v17. This release migrates to ESM (ECMAScript modules) and requires Node.js 20.19.0 or newer. See Stylelint's official Migrating to 17.0.0 documentation.
Rules configuration changes
| Rule | Purpose | Set to | Was set to |
|---|---|---|---|
selector-class-pattern |
Specify a pattern for class selectors | null (disabled) |
Hyphenated BEM |
scss/selector-class-pattern |
Specify a pattern for class selectors, with SCSS nesting support | Hyphenated BEM + resolveNestedSelectors: true |
N/A -replaces selector-class-pattern |
no-duplicate-selectors |
Built-in rule | null (disabled) |
true |
New unused rules
v4.0.0 - Stylelint 16
4.0.0 (2025-12-02)
Features
- Update stylelint to v16.23.1 and up (#45).
- Update all config dependencies to their latest releases, compatible with stylelint v16 (#45).
- Change enforced rules from Stylelint and
stylelint-config-standard-scss(see list below) (#45).
BREAKING CHANGES
The configuration now mandates stylelint v16. Stylelint has stopped enforcing formatting-related rules, which are no longer relevant with the majority of projects now using Prettier for formatting. See Stylelint’s official Migrating to 16.0.0 documentation.
Newly enforced rules:
at-rule-no-deprecated- Disallow deprecated at-rules.
- Set to:
true
block-no-redundant-nested-style-rules- Disallow redundant nested style rules within blocks.
- Set to:
true
color-function-alias-notation- Specify alias notation for color-functions.
- Set to:
without-alpha
container-name-pattern- Specify a pattern for container names.
- Set to:
^(--)?(a-za-z0-9*)(-a-z0-9+)*$,
declaration-property-value-keyword-no-deprecated- Disallow deprecated keywords for properties within declarations.
- Set to:
true
layer-name-pattern- Specify a pattern for layer names.
- Set to:
^(a-za-z0-9*)(.-a-z0-9+)*$,
lightness-notation- Specify number or percentage notation for lightness.
- Set to:
percentage
media-type-no-deprecated- Disallow deprecated media types.
- Set to:
true
nesting-selector-no-missing-scoping-root- Disallow missing scoping root for nesting selectors.
- Set to:
true, ignoreAtRules: mixin
no-invalid-position-declaration- Disallow invalid position declarations.
- Set to:
true
property-no-deprecated- Disallow deprecated properties.
- Set to:
true
scss/load-no-partial-leading-underscore- Replaces
scss/at-import-no-partial-leading-underscore. - Disallow leading underscore in partial names in
@import,@use,@forward, andmeta.load-css$urlparameter. - Set to:
true
- Replaces
scss/load-partial-extension- Replaces
scss/at-import-partial-extension. - Require or disallow extension in
@import,@use,@forward, andmeta.load-csscommands. - Set to:
never
- Replaces
syntax-string-no-invalid- Disallow invalid
syntaxstrings. - Set to:
true
- Disallow invalid
Rules with new configuration:
scss/dollar-variable-colon-space-after- Require or disallow whitespace after the colon in
$-variable declarations. - Was set to:
always - Now set to:
always-single-line
- Require or disallow whitespace after the colon in
length-zero-no-unit- Was set to:
true, ignore: custom-properties - Now set to:
true, ignore: custom-properties, ignorePreludeOfAtRules: function, mixin
- Was set to:
New rules which have been explicitly disabled:
at-rule-descriptor-no-unknownat-rule-descriptor-value-no-unknownat-rule-prelude-no-invaliddeclaration-property-value-no-unknownmedia-feature-name-value-no-unknownmedia-query-no-invalid
Renamed rules which are disabled:
v3.1.0 – Tailwind 4
v3.0.0 – Stylelint 15
3.0.0 (2023-08-17)
Features
- Update stylelint to v15 (#28).
- Update all config dependencies to their latest releases, compatible with stylelint v15 (#28).
- Remove dependency on
stylelint-config-prettier, which is no longer needed with stylelint v15 (#28). - Change enforced rules from
stylelint-config-standard, including 10 new rules (see list below) (#28).
BREAKING CHANGES
The configuration now mandates stylelint v15, and no longer uses stylelint-config-prettier. Stylelint has stopped enforcing formatting-related rules, which are no longer relevant with the majority of projects now using Prettier for formatting. See Stylelint’s official Migrating to 15.0.0 documentation.
The configuration also switches from stylelint-config-standard to stylelint-config-standard-scss, which more correctly disables CSS-only rules and replaces them with SCSS-aware rules.
Newly enforced rules:
import-notation- Specify string or URL notation for @import rules.
- Set to:
string
keyframe-block-no-duplicate-selectors- Disallow duplicate selectors within keyframe blocks.
- Set to:
true
keyframe-selector-notation- Specify keyword or percentage notation for keyframe selectors.
- Set to:
percentage-unless-within-keyword-only-block
selector-anb-no-unmatchable- Disallow unmatchable An+B selectors.
- Set to:
true
selector-attribute-quotes- Require or disallow quotes for attribute values.
- Set to:
always
scss/at-if-no-null- Check for equality to null is unnecessarily explicit since null is falsey in Sass.
- Set to:
true
scss/at-import-no-partial-leading-underscore- Disallow leading underscore in partial names in @import.
- Set to:
true
scss/at-import-partial-extension- Require or disallow extension in @import commands.
- Set to:
never
scss/declaration-nested-properties-no-divided-groups- Disallow nested properties of the same "namespace" be divided into multiple groups.
- Set to:
true
scss/no-duplicate-mixins- Disallow duplicate mixins within a stylesheet.
- Set to:
true
New rules which have been explicitly disabled:
annotation-no-unknown- Disallow unknown annotations.
- Set to: disabled (rather than
true)
selector-not-notation- Specify simple or complex notation for :not() pseudo-class selectors.
- Set to: disabled (rather than
complex, syntax from Selectors Level 4)
media-feature-range-notation- Specify context or prefix notation for media feature ranges.
- Set to: disabled (rather than
context, syntax from Media Queries Level 4)
at-rule-empty-line-before- Require or disallow an empty line before at-rules.
- Set to: disabled (rather than
always except first-nested, blockless-after-blockless; ignore after-comment; ignoreAtRules else)
scss/at-extend-no-missing-placeholder- Disallow at-extends (@extend) with missing placeholders.
- Set to: disabled (rather than
true)
scss/at-function-pattern- Specify a pattern for Sass/SCSS-like function names.
- Set to: disabled (rather than "kebab-case")
scss/dollar-variable-pattern- Specify a pattern for Sass-like variables.
- Set to: disabled (rather than "kebab-case")
scss/dollar-variable-empty-line-before- Require an empty line or disallow empty lines before $-variable declarations.
- Set to: disabled (rather than
true)
scss/double-slash-comment-empty-line-before- Require or disallow an empty line before //-comments.
- Set to: disabled (rather than
true)
scss/no-global-function-names- Disallows the use of global function names, as these global functions are now located inside built-in Sass modules.
- Set to: disabled (rather than
true)
Rules which have been replaced by a Sass-specific equivalent:
comment-no-empty(replaced withscss/comment-no-empty)function-no-unknown(replaced withscss/function-no-unknown)
New formatting rules which are enforced:
scss/at-if-closing-brace-newline-after: always-last-in-chainscss/at-if-closing-brace-space-after: always-intermediatescss/at-else-closing-brace-newline-after: always-last-in-chainscss/at-else-closing-brace-space-after: always-intermediatescss/at-else-empty-line-before: neverscss/at-else-if-parentheses-space-before: alwaysscss/at-function-parentheses-space-before: neverscss/at-mixin-parentheses-space-before: neverscss/at-rule-conditional-no-parentheses: truescss/dollar-variable-colon-space-after: alwaysscss/dollar-variable-colon-space-before: neverscss/double-slash-comment-whitespace-inside: alwaysscss/function-quote-no-quoted-strings-inside: truescss/function-unquote-no-unquoted-strings-inside: truescss/operator-no-newline-after: truescss/operator-no-newline-before: truescss/operator-no-unspaced: true
Formatting rules which are no longer enforced:
v2.0.3 – Even fewer rules
2.0.3 (2023-08-17)
Bug fixes
Disables the following rules introduced in Stylelint 14 & related package updates, to make it simpler for projects to upgrade to Stylelint 14:
v2.0.2 – Fewer rules
2.0.2 (2023-08-17)
Bug fixes
Disables the following rules introduced in Stylelint 14 & related package updates, to make it simpler for projects to upgrade to Stylelint 14:
keyframes-name-pattern:^(a-za-z0-9*)(-a-z0-9+)*$, message: Expected keyframe name to be kebab-casealpha-value-notation:percentage, exceptProperties: opacitycolor-function-notation:moderncustom-media-pattern:^(a-za-z0-9*)(-a-z0-9+)*$, message: Expected custom media query name to be kebab-casecustom-property-pattern:^(a-za-z0-9*)(-a-z0-9+)*$, message: Expected custom property name to be kebab-case
v2.0.1 – Stylelint 14 and Sass
v2.0.0 – Stylelint 14
2.0.0 (2023-08-17)
Features
- Update stylelint to v14 for compatibility with PostCSS v8 (#13).
- Update all config dependencies to their latest releases, compatible with stylelint v14 (#13).
- Remove
stylelint-a11y, which is no longer maintained and does not support stylelint v14.no-text-align-justifyhas been replaced withdeclaration-property-value-disallowed-list(#13). - Stop enforcing
function-calc-no-invalid, which has been removed from stylelint (#13) - Change enforced rules from stylelint-config-standard and stylelint-config-prettier.
BREAKING CHANGES
The configuration now mandates stylelint v14, doesn’t use stylelint-a11y, and follows changes in enforced rules from stylelint-config-standard and stylelint-config-prettier.
No longer enforced (all formatting related):
at-rule-name-space-afterdeclaration-bang-space-afterdeclaration-bang-space-beforemedia-feature-colon-space-aftermedia-feature-colon-space-beforemedia-feature-parentheses-space-insideselector-attribute-brackets-space-insideselector-attribute-operator-space-afterselector-attribute-operator-space-beforeselector-pseudo-class-parentheses-space-inside
No longer enforced (from stylelint-a11y):
a11y/no-obsolete-attributea11y/no-obsolete-elementa11y/no-outline-none
Newly enforced rules:
alpha-value-notation:percentage, exceptProperties: opacitycolor-function-notation:moderncustom-media-pattern:^(a-za-z0-9*)(-a-z0-9+)*$, message: Expected custom media query name to be kebab-casecustom-property-pattern:^(a-za-z0-9*)(-a-z0-9+)*$, message: Expected custom property name to be kebab-casedeclaration-block-no-redundant-longhand-propertiesfont-family-name-quotes:always-where-recommendedfunction-url-quotes:alwayshue-degree-notation:anglekeyframes-name-pattern:^(a-za-z0-9*)(-a-z0-9+)*$, message: Expected keyframe name to be kebab-caseno-irregular-whitespacenumber-max-precision:4rule-empty-line-before:always-multi-line, except: first-nested, ignore: after-commentselector-id-pattern:^(a-za-z0-9*)(-a-z0-9+)*$, message: Expected id selector to be kebab-caseshorthand-property-no-redundant-valuescustom-property-no-missing-var-functiondeclaration-block-no-duplicate-custom-properties