stylelint
Advanced tools
Changelog
6.0.0
CssSyntaxError
is no longer thrown but reported alongside warnings.stylelint.utils.cssWordIsVariable()
.at-rule-name-case
rule.function-name-case
rule.property-case
rule.selector-pseudo-class-case
rule.selector-pseudo-element-case
rule.unit-case
rule.value-keyword-case
rule.indentClosingBrace
option to indentation
.indentInsideParens
option to indentation
.consecutive-duplicates
option for declaration-block-no-duplicate-properties
rule.block-no-empty
no longer delivers false positives for less syntax.declaration-block-trailing-semicolon
better understands nested at-rules.number-zero-length-no-unit
now work with q
unit and ignores s
, ms
, kHz
, Hz
, dpcm
, dppx
, dpi
unitsChangelog
5.4.0
unit-no-unknown
rule.no-descending-specificity
no longer gets confused when the last part of a selector is a compound selector.indentation
to complain about Sass maps.declaration-block-no-ignored-properties
now ignore clear
for position: absolute
and position: relative
and does not ignore float
on display: table-*
.Changelog
5.3.0
stylelint.createRuleTester()
.declaration-block-no-ignored-properties
rule.function-max-empty-lines
rule.function-url-data-uris
rule.block-closing-brace-newline-after
accepts single-line comments immediately after the closing brace.block-closing-brace-newline-after
use of "single space", rather than "newline", in its messages.font-weight-notation
now ignores initial
value.function-*
rules should all now ignore all Sass maps and lists.function-calc-no-unspaced-operator
accepts newlines.function-comma-space-after
, function-comma-space-before
, function-parentheses-newline-inside
and function-parentheses-space-inside
now ignore SCSS maps.max-line-length
options validation.no-unknown-animations
now ignores none
, initial
, inherit
, unset
values.property-value-blacklist
and -whitelist
no longer error on properties without a corresponding list entry.selector-class-pattern
now ignores selectors with Sass interpolation.selector-id-pattern
now ignores selectors with Sass interpolation.selector-no-id
now ignores keyframe selectors.unit-blacklist
and unit-whitelist
now ignores url
functions.Changelog
5.2.1
function-calc-no-unspaced-operator
now better ignores non-calc
functions.no-descending-specificity
no longer delivers false positives after second run in Atom linter.stylelint-disable-rule
imported correctly.Changelog
5.2.0
at-rule-semicolon-newline-after
rule.no-indistinguishable-colors
rule.stylelint-disable-reason
rule.declaration-bang-space-*
understands arbitrary bang declarations (e.g. !default
).font-weight-notation
now ignore inherit
value.indentation
treats @nest
at-rules like regular rules with selectors.no-duplicate-selectors
contextualizes selectors by all at-rules, not just media queries.no-duplicate-selectors
no longer delivers false positives after second run in Atom linter.no-duplicate-selectors
no longer delivers false positives with descendant combinators.number-no-trailing-zeros
no longer delivers false positives in url()
arguments.root-no-standard-properties
no longer delivers false positives inside the :not()
pseudo-selector.selector-list-comma-*
rules no longer deliver false positives inside functional notation.Changelog
5.1.0
selector-type-case
rule.Changelog
5.0.1
string-no-newline
no longer stumbles when there are comment-starting characters inside strings.Changelog
5.0.0
no-indistinguishable-colors
because its dependencies were unusable in Atom. (To be re-evaluated and re-added later.)"warn": true
secondary option. Use "severity": "warning"
, instead.color-no-named
rule. Use the new color-named
rule, with the "never"
option instead.declaration-block-no-single-line
rule. Use the new block-no-single-line
rule instead.rule-no-duplicate-properties
rule. Use the new declaration-block-no-duplicate-properties
rule instead.rule-no-shorthand-property-overrides
rule. Use the new declaration-block-no-shorthand-property-overrides
rule instead.rule-properties-order
rule. Use the new declaration-block-properties-order
rule instead.rule-trailing-semicolon
rule. Use the new declaration-block-trailing-semicolon
rule instead.true
option for emptyLineBefore
when using property groups in rule-properties-order
. Use the new "always"
or "never"
option instead."always"
option for font-weight-notation
. Use the new always-where-possible
option instead.stylelint-disable
commands.max-nesting-depth
does not warn about blockless at-rules.function-comma-newline-after
and related rules consider input to be multi-line (applying to "always-multi-line", etc.) when the newlines are at the beginning or end of the input.no-indistinguishable-colors
no longer errors on color functions containing spaces e.g. rgb(0, 0, 0)
-- but also removed the rule (see above).declaration-block-properties-order
no longer fails when an unspecified property comes before or after a specified property in a group with emptyLineBefore: true
.indentation
no longer has false positives when there are empty lines within multi-line values.declaration-colon-*-after
no longer fail to do their job when you want a space or newline after the colon and instead there is no space at all.Changelog
4.5.1
no-unsupported-browser-features
options now optional.no-duplicate-selectors
now ignores keyframe selectors.Changelog
4.5.0
"warn": true
secondary option. Use "severity": "warning"
, instead.color-no-named
rule. Use the new color-named
rule, with the "never"
option instead.declaration-block-no-single-line
rule. Use the new block-no-single-line
rule instead.rule-no-duplicate-properties
rule. Use the new declaration-block-no-duplicate-properties
rule instead.rule-no-shorthand-property-overrides
rule. Use the new declaration-block-no-shorthand-property-overrides
rule instead.rule-properties-order
rule. Use the new declaration-block-properties-order
rule instead.rule-trailing-semicolon
rule. Use the new declaration-block-trailing-semicolon
rule instead.true
option for emptyLineBefore
when using property groups in rule-properties-order
. Use the new "always"
or "never"
option instead."always"
option for font-weight-notation
. Use the new always-where-possible
option instead.severity
secondary option as a replacement for "warn": true
to alter a rule's severity.block-no-single-line
rule.color-named
rule.declaration-block-no-duplicate-properties
rule.declaration-block-no-shorthand-property-overrides
rule.declaration-block-properties-order
rule.declaration-block-trailing-semicolon
rule.max-nesting-depth
rule.no-browser-hacks
rule.no-descending-specificity
rule.no-indistinguishable-colors
rule.no-unsupported-browser-features
rule.selector-max-specificity
rule.string-no-newline
rule."always"
and "never"
option to rule-properties-order
emptyLineBefore
when using property groupsnamed-where-possible
option to font-weight-notation
.unspecified: "bottomAlphabetical"
option to the rule-properties-order
rule.ignoreAtRules: []
option to the block-opening-brace-space-before
and block-closing-brace-newline-after
rules.&
) as a prefix in selector-no-type
.stylelint-disable-line
feature.withinComments
, withinStrings
, and checkStrings
options to styleSearch
, and insideString
property to the styleSearch
match object.resolveNestedSelectors
option to the selector-class-pattern
rule.stylelint-disable
is misused.selector-no-vendor-prefix
no longer delivers two warnings on vendor-prefixed pseudo-elements with two colons, e.g. ::-moz-placeholder
.no-duplicate-selectors
rule now resolves nested selectors.font-weight-notation
does not throw false warnings when normal
is used in certain ways.selector-no-*
and selector-*-pattern
rules now ignore custom property sets.no-duplicate-selectors
.selector-no-id
does not warn about Sass interpolation inside an :nth-child()
argument.rule-nested-empty-line-before
, rule-non-nested-empty-line-before
, comment-empty-line-before
and at-rule-empty-line-before
.number-leading-zero
, function-comma-space-*
, and declaration-colon-*
do not throw false positives in url()
arguments.