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:
number-leading-zeroat-rule-empty-line-beforeat-rule-name-caseat-rule-name-newline-afterat-rule-name-space-afterat-rule-semicolon-newline-afterat-rule-semicolon-space-beforeblock-opening-brace-newline-afterblock-opening-brace-newline-beforeblock-opening-brace-space-afterblock-opening-brace-space-beforeblock-closing-brace-empty-line-beforeblock-closing-brace-newline-afterblock-closing-brace-newline-beforeblock-closing-brace-space-afterblock-closing-brace-space-beforecolor-hex-casedeclaration-bang-space-afterdeclaration-bang-space-beforedeclaration-block-semicolon-newline-afterdeclaration-block-semicolon-newline-beforedeclaration-block-semicolon-space-afterdeclaration-block-semicolon-space-beforedeclaration-block-trailing-semicolondeclaration-colon-newline-afterdeclaration-colon-space-afterdeclaration-colon-space-beforefunction-comma-newline-afterfunction-comma-newline-beforefunction-comma-space-afterfunction-comma-space-beforefunction-max-empty-linesfunction-whitespace-afterindentationlinebreaksmax-empty-linesmax-line-lengthmedia-feature-colon-space-aftermedia-feature-colon-space-beforemedia-feature-name-casemedia-feature-parentheses-space-insidemedia-feature-range-operator-space-aftermedia-feature-range-operator-space-beforemedia-query-list-comma-newline-aftermedia-query-list-comma-newline-beforemedia-query-list-comma-space-aftermedia-query-list-comma-space-beforeno-empty-first-lineno-eol-whitespaceno-extra-semicolonsno-missing-end-of-source-newlinenumber-no-trailing-zerosproperty-caseselector-attribute-brackets-space-insideselector-attribute-operator-space-afterselector-attribute-operator-space-beforeselector-attribute-quotesselector-combinator-space-afterselector-combinator-space-beforeselector-descendant-combinator-no-non-spaceselector-list-comma-newline-afterselector-list-comma-newline-beforeselector-list-comma-space-afterselector-list-comma-space-beforeselector-max-empty-linesselector-pseudo-class-parentheses-space-insideselector-pseudo-element-caseselector-pseudo-class-casestring-quotesunicode-bomunit-casevalue-list-comma-newline-aftervalue-list-comma-newline-beforevalue-list-comma-space-aftervalue-list-comma-space-beforevalue-list-max-empty-lines