stylelint 8.0.0
This release is accompanied by:
- A new semantic version policy. The use of the tilde (
~) inpackage.jsonis now recommended, e.g."stylelint": "~8.0.0", to guarantee the results of your builds (#1865). - A new VISION document, complemented by (#2704):
- The restructuring of the list of rules into three groups:
- The release of a new sharable config,
stylelint-config-recommended. This config only turns on the possible error rules.stylelint-config-standardnow builds on top of the recommended config by turning on over 60 additional stylistic rules.
Changes:
- Removed: the 21 rules deprecated in
7.8.0&7.12.0(#2422 & #2693).block-no-single-line.custom-property-no-outside-rootdeclaration-block-no-ignored-properties.declaration-block-properties-order.function-url-data-uris.media-feature-no-missing-punctuation.no-browser-hacks.no-indistinguishable-colors.no-unsupported-browser-features.root-no-standard-propertiesrule-nested-empty-line-before.rule-non-nested-empty-line-before.selector-no-attribute.selector-no-combinator.selector-no-empty.selector-no-id.selector-no-type.selector-no-universal.selector-root-no-composition.stylelint-disable-reason.time-no-imperceptible.
- Removed: the 4 options deprecated in
7.8.0(#2433)."all-nested"option forat-rule-empty-line-before."blockless-group"option forat-rule-empty-line-before."between-comments"option forcomment-empty-line-before."at-rules-without-declaration-blocks"option formax-nesting-depth.
- Changed: compatibility with
postcssfrom@5to@6(#2561). - Changed: parse errors now trigger exit with non-zero code (#2713).
- Changed:
report-needless-disablesnow exits with non-zero code (#2341). - Changed:
*-blacklistand*-whitelist(andignore* []secondary options) are now case sensitive. Use regular expressions with theiflag for case insensitivity (#2709). - Changed:
*-empty-line-beforenow correctly handle shared-line comments (#2262). - Changed:
*-empty-line-beforenow consider line as empty if it contains whitespace only (#2440). - Changed:
function-linear-gradient-no-nonstandard-directionnow checks all linear-gradients in a value list (#2496). - Changed:
selector-max-compound-selectorsnow checks all resolved selectors, rather than just the deepest (#2350). - Added:
disableDefaultIgnoresoption (--disable-default-ignoresin CLI), to allow linting ofnode_modulesandbower_componentsdirectories (#2464). - Added: more efficient file ignoring with
.stylelintignore(#2464). - Added:
ignore: ["child"]option toselector-max-type(#2701). - Fixed:
declaration-block-no-redundant-longhand-propertiesanddeclaration-block-no-shorthand-property-overridesunderstand more shorthand properties (#2354). - Fixed:
selector-max-typeno longer produces false negatives for when child, next-sibling and following-sibling combinators are used withignore: ["descendant"](#2701).