stylelint
Advanced tools
Changelog
7.3.1
Changelog
7.3.0
processors
can accept options objects.ignore: ["inside-function"]
option to color-named
.--ignore-path
and --report-needless-disables
no longer fails when used together.block-closing-brace-newline-after
and block-closing-brace-space-after
now allow a trailing semicolon after the closing brace of a block.block-no-single-line
now ignores empty blocks.declaration-block-no-ignored-properties
now uses the value of the last occurrence of a triggering property.indentation
now correctly handles _
hacks on property names.property-no-unknown
now ignores SCSS nested properties.Changelog
7.2.0
--report-needless-disables
and reportNeedlessDisables
option.--ignore-disables
and ignoreDisables
option.--config-basedir
option to CLI.declaration-block-no-redundant-longhand-properties
rule.function-url-scheme-whitelist
rule.media-feature-name-no-unknown
rule.selector-descendant-combinator-no-non-space
rule.value-list-max-empty-lines
rule.ignoreProperties
option to color-named
.ignore: ["consecutive-duplicates-with-different-values"]
option to declaration-block-no-duplicate-properties
.ignore: ["comments"]
option to max-line-length
.ignoreAtRules
option to max-nesting-depth
.ignoreProperties
option to unit-blacklist
and unit-whitelist
configFile
and configBasedir
can now be used together.max-line-length
now correctly handles Windows line endings.no-descending-specificity
treats selectors with pseudo-elements as distinct from their counterparts without pseudo-classes, because they actually target different elements.no-unknown-animations
and unit-blacklist
now handle numbers without leading zeros.root-no-standard-properties
now handles custom property sets.selector-no-type
ignore: ["descendant"]
option now correctly handles descendants within a selector list.selector-pseudo-class-no-unknown
now understands the Shadow DOM selectors of host
and host-context
.selector-pseudo-element-no-unknown
now understands the Shadow DOM selector of slotted
.Changelog
7.1.0
block-closing-brace-empty-line-before
rule.comment-no-empty
rule.custom-property-empty-line-before
rule.declaration-empty-line-before
rule.media-feature-name-case
rule.selector-nested-pattern
rule.selector-pseudo-class-blacklist
rule.selector-pseudo-class-whitelist
rule.ignore*
secondary options of the *-no-unknown
rules.ignore: ["blockless-after-same-name-blockless"]
option to at-rule-empty-line-before
.except: ["blockless-after-same-name-blockless"]
option to at-rule-empty-line-before
.ignore: ["empty-lines"]
option to no-eol-whitespace
.ignoreTypes
option to selector-no-type
to whitelist allowed types for selectors.color-named
now ignores declarations that accept custom idents.font-family-name-quotes
correctly handles numerical font weights for the font
shorthand property.indentation
now correctly handles Windows line endings within parentheticals.media-feature-no-missing-punctuation
now ignores media features containing complex values e.g. (min-width: ($var - 20px))
and (min-width: calc(100% - 20px))
.no-descending-specificity
message to correctly show which selector should come first.selector-combinator-space-after
and selector-combinator-space-before
now ignore operators within parenthetical non-standard constructs.Changelog
7.0.3
selector-class-pattern
now ignores fractional keyframes selectors.selector-max-specificity
now ignores selectors containing the matches()
pseudo-class, and warns if the underlying specificity
module cannot parse the selector.selector-no-type
with secondary option ignore: ["descendant"]
will now resolve nested selectors.Changelog
7.0.2
at-rule-blacklist
, at-rule-whitelist
, comment-word-blacklist
, selector-attribute-operator-blacklist
, selector-attribute-operator-whitelist
now accept array as first option.unit-*
rules now ignore CSS hacks.Changelog
7.0.0
--extract
and extractStyleTagsFromHtml
options. Instead, build and use processors.your-namespace/your-rule-name
rule names are supported. (If your plugin provides only a single rule or you can't think of a good namespace, you can simply use plugin/my-rule
.)--verbose
CLI flag. Use --formatter verbose
instead.0.12.x
support. 4.2.1 LTS
or greater is now required.media-query-parentheses-space-inside
rule. Use the new media-feature-parentheses-space-inside
rule instead.no-missing-eof-newline
rule. Use the new rule no-missing-end-of-source-newline
instead.number-zero-length-no-unit
rule. Use the length-zero-no-unit
rule instead.property-unit-blacklist
rule. Use the declaration-property-unit-blacklist
rule instead.property-unit-whitelist
rule. Use the declaration-property-unit-whitelist
rule instead.property-value-blacklist
rule. Use the declaration-property-value-blacklist
rule instead.property-value-whitelist
rule. Use the declaration-property-value-whitelist
rule instead."emptyLineBefore"
option for declaration-block-properties-order
. If you use this option, please consider creating a plugin for the community."single-where-required"
, "single-where-recommended"
, "single-unless-keyword"
, "double-where-required"
, "double-where-recommended"
and "double-unless-keyword"
options for font-family-name-quotes
. Instead, use the "always-unless-keyword"
, always-where-recommended
or always-where-required
options together with the string-quotes
rule."single"
, "double"
and "none"
options for function-url-quotes
. Instead, use the "always"
or "never"
options together with the string-quotes
rule."hierarchicalSelectors"
option for indentation
. If you use this option, please consider creating a plugin for the community.stylelint.utils.cssWordIsVariable()
.stylelint.utils.styleSearch()
. Use the external style-search module instead.stylelintError
to true
, which in turn causes CLI to exit with a non-zero code..scss
, .less
, and .sss
..stylelintignore
now uses .gitignore
syntax, and Stylelint looks for it in process.cwd()
.ignored: true
property, which various formatters can use as needed. The standard string
formatter prints nothing for ignored files; but when the verbose
formatter is used, ignored files are included in the filelist.-v
flag to display version number.comment-word-blacklist
no longer ignores words within copyright comments.comment-word-blacklist
will now identify strings within comments, rather than just at the beginning of, when the string option is used.declaration-block-no-ignored-properties
now detects use of min-width
and max-width
with inline
, table-row
, table-row-group
, table-column
and table-column-group
elements.declaration-block-no-ignored-properties
now detects use of overflow
, overflow-x
and overflow-y
with inline
elements.declaration-block-no-ignored-properties
now ignores the combination of float
and display: inline-block | inline
.font-family-name-quotes
now checks the font
property in addition to the font-family
property.font-family-name-quotes
treats -apple-*
and BlinkMacSystemFont
system fonts as keywords that should never be wrapped in quotes.indentation
now checks inside of parentheses by default. If you use the indentInsideParens: "once"
secondary option, simply remove it from your config. If you do not want to check inside of parentheses, use the new ignore: ["inside-parens"]
secondary option. The indentInsideParens: "twice"
and indentInsideParens: "once-at-root-twice-in-block"
secondary options are unchanged.keyframe-declaration-no-important
now checks vendor prefixed @keyframes
at-rules.selector-attribute-quotes
now checks attribute selectors with whitespace around the operator or inside the brackets.time-no-imperceptible
now checks vendor prefixed properties.unit-*
rules now check @media
values too.ruleFunction.primaryOptionArray = true
.media-feature-parentheses-space-inside
rule.no-missing-end-of-source-newline
rule.property-no-unknown
rule.no-unknown-animations
now classifies vendor prefixed @keyframes
at-rules as known.Changelog
6.9.0
defaultSeverity
configuration option.stylelint
) is equivalent to stylelint --help
.function-url-no-scheme-relative
rule.selector-attribute-quotes
rule.process.exitCode
with stdOut
to allow the process to exit naturally and avoid truncating output.function-calc-no-unspaced-operator
correctly interprets negative fractional numbers without leading zeros and those wrapped in parentheses.no-extra-semicolons
now ignores semicolons after Less mixins.number-max-precision
now ignores uppercase and mixed case @import
at-rules.selector-max-specificity
no longer crashes on selectors containing :not()
pseudo-classes.time-no-imperceptible
correctly handles negative time.Changelog
6.8.0
-e
and --extract
CLI flags, and the extractStyleTagsFromHtml
Node.js API option. If you use these flags or option, please consider creating a processor for the community.at-rule-no-unknown
rule.no-empty-source
rule.except: ["after-single-line-comment"]
option for rule-non-nested-empty-line-before
.ignoreProperties: []
option for declaration-block-no-duplicate-properties
.