- Added: plugins can allow primary option arrays by setting
ruleFunction.primaryOptionArray = true. - Fixes: better handling quotes in selector attribute with multiple attributes.
- Added:
defaultSeverityconfiguration option. - Added: invoking the CLI with no arguments and no stdin (i.e. just
stylelint) is equivalent tostylelint --help. - Added:
function-url-no-scheme-relativerule. - Added:
selector-attribute-quotesrule. - Fixed: the CLI now uses
process.exitCodewithstdOutto allow the process to exit naturally and avoid truncating output. - Fixed:
function-calc-no-unspaced-operatorcorrectly interprets negative fractional numbers without leading zeros and those wrapped in parentheses. - Fixed:
no-extra-semicolonsnow ignores semicolons after Less mixins. - Fixed:
number-max-precisionnow ignores uppercase and mixed case@importat-rules. - Fixed:
selector-max-specificityno longer crashes on selectors containing:not()pseudo-classes. - Fixed:
time-no-imperceptiblecorrectly handles negative time.
- Deprecated:
-eand--extractCLI flags, and theextractStyleTagsFromHtmlnode API option. If you use these flags or option, please consider creating a processor for the community. See the release planning document for more details. - Added:
at-rule-no-unknownrule. - Added:
no-empty-sourcerule. - Added:
except: ["after-single-line-comment"]option forrule-non-nested-empty-line-before. - Added:
ignoreProperties: []option fordeclaration-block-no-duplicate-properties. - Fixed: accuracy of warning positions for empty blocks when using SugarSS parser.
- Fixed:
block-*-brace-*-beforeCRLF (\r\n) warning positioning. - Fixed:
no-descending-specificitynow does comparison of specificity using ints, rather than strings. - Fixed:
selector-no-typeandselector-type-casenow ignore non-standard keyframe selectors (e.g. within an SCSS mixin). - Fixed:
selector-type-no-unknownno longer reports fractional keyframe selectors.
- Added:
ignoreFunctions: []option forfunction-name-case. - Fixed: rules using
findFontFamilyutil correctly interpret<font-size>/<line-height>values with unitless line-heights. - Fixed:
indentationbetter understands nested parentheticals that aren't just Sass maps and lists. - Fixed:
no-unsupported-browser-featuresmessage now clearly states that only fully supported features are allowed. - Fixed:
selector-max-specificityno longer reports that a selector with 11 elements or more has a higher specificity than a selector with a single classname. - Fixed:
selector-type-no-unknownno longer warns for complex keyframe selectors.
- Deprecated:
number-zero-length-no-unit. Uselength-zero-no-unitinstead. - Deprecated:
property-*-blacklistandproperty-*-whitelist. Usedeclaration-property-*-blacklistanddeclaration-property-*-whitelistinstead. - Deprecated:
-vand--verboseCLI flags. Use-f verboseor--formatter verboseinstead. - Deprecated:
stylelint.util.styleSearch(). Use the external module style-search instead. - Added: option
ignorePath(for JS) and--ignore-path(for CLI). - Added:
-halias for--helpCLI flag. - Added:
at-rule-blacklistrule. - Added:
at-rule-name-newline-afterrule. - Added:
at-rule-whitelistrule. - Added:
ignore: "blockless-group"option forat-rule-empty-line-before. - Added:
ignoreAtRules: []option forat-rule-empty-line-before. - Added:
function-blacklistnow accepts regular expressions. - Added:
function-whitelistnow accepts regular expressions. - Fixed: crash when tty columns is reported as zero, which happened when running stylelint on Travis CI in OSX.
- Fixed: selector-targeting rules ignore Less mixins and extends.
- Fixed:
at-rule-name-newline-afternow correctly accepts one or more newlines. - Fixed:
declaration-block-semicolon-newline-beforenow correctly accepts one or more newlines. - Fixed:
function-url-quotesignores values containing$sassand@lessvariables. - Fixed:
function-whitespace-afterignorespostcss-simple-vars-style interpolation. - Fixed:
indentationbetter understands nested parentheticals, like nested Sass maps. - Fixed:
no-extra-semicolonsreports errors on the correct line. - Fixed:
selector-combinator-space-*rules now ignore escaped combinator-like characters. - Fixed:
selector-type-no-unknownignores non-standard usage of percentage keyframe selectors (e.g. within an SCSS mixin). - Fixed:
value-keyword-casenow ignores custom idents of propertiesanimation,font,list-style.
- Deprecated:
"emptyLineBefore"option fordeclaration-block-properties-order. If you use this option, please consider creating a plugin for the community. See the release planning document for more details. - Deprecated:
"single-where-required","single-where-recommended","single-unless-keyword","double-where-required","double-where-recommended"and"double-unless-keyword"options forfont-family-name-quotes. Instead, use the"always-unless-keyword",always-where-recommendedoralways-where-requiredoptions together with thestring-quotesrule. - Deprecated:
"single","double"and"none"options forfunction-url-quotes. Instead, use the"always"or"never"options together with thestring-quotesrule. - Deprecated:
"hierarchicalSelectors"option forindentation. If you use this option, please consider creating a plugin for the community. See the release planning document for more details. - Fixed: the string formatter no longer errors on non-rule errors.
- Fixed:
selector-list-comma-*rules now ignore Less mixins. - Fixed:
selector-max-compound-selectorsno longer errors on Less mixins. - Fixed:
selector-type-no-unknownnow ignores all An+B notation and linguistic pseudo-classes. - Fixed:
selector-type-no-unknownnow ignores obsolete HTML tags and<hgroup>.
- Added:
selector-max-compound-selectorsrule. - Fixed:
babel-polyfillremoved so it doesn't clash with other processes usingbabel-polyfill. - Fixed:
selector-type-caseandselector-type-no-unknownrules now ignore SCSS placeholder selectors.
- Fixed:
selector-pseudo-class-case,selector-pseudo-class-no-unknown,selector-pseudo-element-case,selector-pseudo-element-no-unknownrules now ignore SCSS variable interpolation. - Fixed:
selector-type-no-unknownnow ignores nested selectors and keyframe selectors.
- Fixed:
shorthand-property-no-redundant-valuesnow ignoresbackground,font,border,border-top,border-bottom,border-left,border-right,list-style,transitionproperties. - Fixed:
unit-no-unknownnow ignores hex colors.
- Added:
keyframe-declaration-no-importantrule. - Added:
selector-attribute-operator-blacklistrule. - Added:
selector-attribute-operator-whitelistrule. - Added:
selector-pseudo-class-no-unknownrule. - Added:
selector-type-no-unknownrule. - Fixed: string formatter no longer errors on multi-byte
message. - Fixed: catch errors thrown by
postcss-selector-parserand register them as PostCSS warnings, providing a better UX for editor plugins. - Fixed: some rules now better handle case insensitive CSS identifiers.
- Fixed:
font-family-name-quotes,media-feature-no-missing-punctuation,media-query-list-comma-newline-after,media-query-list-comma-newline-before,media-query-list-comma-space-afterandmedia-query-list-comma-space-beforerules now better ignore SCSS, Less variables and nonstandard at-rules. - Fixed:
no-unknown-animationsnow ignoreseasevalue. - Fixed:
unit-blacklist,unit-case,unit-no-unknown,unit-whitelistnow better accounts interpolation. - Fixed:
unit-no-unknownno longer breaks Node 0.12 (because we've included the Babel polyfill). - Fixed:
value-keyword-casenow ignores custom idents of propertiesanimation-name,counter-increment,font-family,grid-row,grid-column,grid-area,list-style-type. - Fixed: wrong example for
always-multi-linein ruleblock-opening-brace-newline-beforedocumentation.
- Fixed:
block-closing-brace-newline-beforeno longer delivers false positives for extra semicolon. - Fixed:
declaration-block-no-ignored-propertiesnow detects use ofvertical-alignwith block-level elements. - Fixed:
font-family-name-quotesis now case insensitive when hunting for font-family properties. - Fixed:
number-zero-length-no-unitnow ignoresdeg,grad,turnandradunits. - Fixed:
selector-no-typedoes a better job when ignoring descendant and compound selectors.
- Fixed:
shorthand-property-no-redundant-valuesnow handles uppercase values properly.
- Fixed:
declaration-block-no-ignored-propertiesnow longer crashes on nested rules.
- Deprecated: support for plugin rule names that aren't namespaced i.e. only
your-namespace/your-rule-namerule names are supported. If your plugin provides only a single rule or you can't think of a good namespace, you can simply useplugin/my-rule). - Added: support for plugins that provides an array of rules.
- Added: support for extracting and linting CSS from within HTML sources.
- Added:
--stdin-filenameoption to CLI. - Added:
at-rule-name-space-afterrule. - Added:
no-extra-semicolonsrule. - Added:
selector-attribute-operator-space-afterrule. - Added:
selector-attribute-operator-space-beforerule. - Added:
selector-max-empty-linesrule. - Added:
selector-pseudo-element-no-unknownrule. - Added: flexible support for end-of-line comments in
at-rule-semicolon-newline-after,block-opening-brace-newline-after, anddeclaration-block-semicolon-newline-after. - Fixed: string and verbose formatters no longer use an ambiguous colour schemes.
- Fixed: string formatter no longer outputs an empty line if there are no problems.
- Fixed: all rules now handle case insensitive CSS identifiers.
- Fixed:
function-comma-newline-afternow allows end-of-line comments. - Fixed:
function-url-quotesnow ignores spaces withinurl(). - Fixed:
no-descending-specificitynow ignores trailing colons within selectors. - Fixed:
no-indistinguishable-colorsnow ignores keyword color names withinurl(). - Fixed:
number-max-precisionnow ignores@importat-rules andurl()functions. - Fixed:
selector-class-patternandselector-id-patternrules now ignore SCSS variable interpolation. - Fixed:
value-list-comma-*rules now ignore SCSS maps.
- Deprecated:
stylelint.utils.cssWordIsVariable()as non-standard syntax utils are now defensive. - Fixed:
declaration-colon-*rules now ignore SCSS lists. - Fixed:
font-weight-notationnow ignores SCSS interpolation. - Fixed:
rule-nested-empty-line-beforenow ignores Less blockless rules (mixin and extend calls).
- Fixed: more problems with exposed
stylelint.createRuleTester.
- Added:
selector-no-qualifying-typerule. - Fixed:
number-leading-zerowill not check@importat-rules. - Fixed:
selector-class-patternnow ignores non-ouputting Less mixin definitions and called Less mixins. - Fixed:
value-keyword-casenow accounts for camelCase keywords (e.g.optimizeSpeed,optimizeLegibilityandgeometricPrecision) when theloweroption is used. - Fixed:
testUtilsandstylelint.createRuleTestermodule mistakes.
- Fixed: documentation links to
selector-pseudo-class-parentheses-space-insideandselector-attribute-brackets-space-inside.
- Added: support for
.stylelintignorefile. - Added: warning message in output when a file is ignored.
- Added:
comment-word-blacklistrule. - Added:
selector-attribute-brackets-space-insiderule. - Added:
selector-pseudo-class-parentheses-space-insiderule. - Added:
shorthand-property-no-redundant-valuesrule. - Added:
ignoreKeywordsoption forvalue-keyword-case. - Fixed: CRLF (
\r\n) warning positioning instring-no-newline. - Fixed: parsing problems when using
///-SassDoc-style comments. - Fixed:
max-empty-linesplaces warning at the end of the violating newlines to avoid positioning confusions.
- Fixed: CRLF (
\r\n) warning positioning inmax-empty-linesandfunction-max-empty-lines.
- Fixed:
CssSyntaxErrorsetserroredon output totrue.
- Fixed:
function-name-casenow accounts for camelCase function names (e.g.translateX,scaleXetc) when theloweroption is used.
- Changed:
CssSyntaxErroris no longer thrown but reported alongside warnings. - Added: new look for standard formatter and support for arbitrary severity names.
- Added: exposed
stylelint.utils.cssWordIsVariable(). - Added:
at-rule-name-caserule. - Added:
function-name-caserule. - Added:
property-caserule. - Added:
selector-pseudo-class-caserule. - Added:
selector-pseudo-element-caserule. - Added:
unit-caserule. - Added:
value-keyword-caserule. - Added:
indentClosingBraceoption toindentation. - Added:
indentInsideParensoption toindentation. - Added:
consecutive-duplicatesoption fordeclaration-block-no-duplicate-propertiesrule. - Fixed:
block-no-emptyno longer delivers false positives for less syntax. - Fixed:
declaration-block-trailing-semicolonbetter understands nested at-rules. - Fixed:
number-zero-length-no-unitnow work withqunit and ignoress,ms,kHz,Hz,dpcm,dppx,dpiunits
- Added:
unit-no-unknownrule. - Fixed:
no-descending-specificityno longer gets confused when the last part of a selector is a compound selector. - Fixed: regression causing
indentationto complain about Sass maps. - Fixed:
declaration-block-no-ignored-propertiesnow ignoreclearforposition: absoluteandposition: relativeand does not ignorefloatondisplay: table-*.
- Added: (experimental) support for Less syntax.
- Added: support for SugarSS syntax.
- Added: exposed
stylelint.createRuleTester(). - Added:
declaration-block-no-ignored-propertiesrule. - Added:
function-max-empty-linesrule. - Added:
function-url-data-urisrule. - Fixed:
block-closing-brace-newline-afteraccepts single-line comments immediately after the closing brace. - Fixed:
block-closing-brace-newline-afteruse of "single space", rather than "newline", in its messages. - Fixed:
font-weight-notationnow ignoresinitialvalue. - Fixed:
function-*rules should all now ignore all Sass maps and lists. - Fixed:
function-calc-no-unspaced-operatoraccepts newlines. - Fixed:
function-comma-space-after,function-comma-space-before,function-parentheses-newline-insideandfunction-parentheses-space-insidenow ignore SCSS maps. - Fixed:
max-line-lengthoptions validation. - Fixed:
no-unknown-animationsnow ignoresnone,initial,inherit,unsetvalues. - Fixed:
property-value-blacklistand-whitelistno longer error on properties without a corresponding list entry. - Fixed:
selector-class-patternnow ignores selectors with Sass interpolation. - Fixed:
selector-id-patternnow ignores selectors with Sass interpolation. - Fixed:
selector-no-idnow ignores keyframe selectors. - Fixed:
unit-blacklistandunit-whitelistnow ignoresurlfunctions.
- Fixed:
function-calc-no-unspaced-operatornow better ignores non-calcfunctions. - Fixed:
no-descending-specificityno longer delivers false positives after second run in Atom linter. - Fixed:
stylelint-disable-ruleimported correctly.
- Added:
at-rule-semicolon-newline-afterrule. - Added:
no-indistinguishable-colorsrule. - Added:
stylelint-disable-reasonrule. - Fixed:
declaration-bang-space-*understands arbitrary bang declarations (e.g.!default). - Fixed:
font-weight-notationnow ignoreinheritvalue. - Fixed:
indentationtreats@nestat-rules like regular rules with selectors. - Fixed:
no-duplicate-selectorscontextualizes selectors by all at-rules, not just media queries. - Fixed:
no-duplicate-selectorsno longer delivers false positives after second run in Atom linter. - Fixed:
no-duplicate-selectorsno longer delivers false positives with descendant combinators. - Fixed:
number-no-trailing-zerosno longer delivers false positives inurl()arguments. - Fixed:
root-no-standard-propertiesno longer delivers false positives inside the:not()pseudo-selector. - Fixed:
selector-list-comma-*rules no longer deliver false positives inside functional notation.
- Added:
selector-type-caserule. - Fixed: no more subtle configuration bug when using extends and plugins together in tangled ways.
- Fixed:
string-no-newlineno longer stumbles when there are comment-starting characters inside strings.
- Removed:
no-indistinguishable-colorsbecause its dependencies were unusable in Atom. (To be re-evaluated and re-added later.) - Removed:
"warn": truesecondary option. Use"severity": "warning", instead. - Removed:
color-no-namedrule. Use the newcolor-namedrule, with the"never"option instead. - Removed:
declaration-block-no-single-linerule. Use the newblock-no-single-linerule instead. - Removed:
rule-no-duplicate-propertiesrule. Use the newdeclaration-block-no-duplicate-propertiesrule instead. - Removed:
rule-no-shorthand-property-overridesrule. Use the newdeclaration-block-no-shorthand-property-overridesrule instead. - Removed:
rule-properties-orderrule. Use the newdeclaration-block-properties-orderrule instead. - Removed:
rule-trailing-semicolonrule. Use the newdeclaration-block-trailing-semicolonrule instead. - Removed
trueoption foremptyLineBeforewhen using property groups inrule-properties-order. Use the new"always"or"never"option instead. - Removed:
"always"option forfont-weight-notation. Use the newalways-where-possibleoption instead. - Added: support for overlapping
stylelint-disablecommands. - Fixed:
max-nesting-depthdoes not warn about blockless at-rules. - Fixed:
function-comma-newline-afterand 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. - Fixed:
no-indistinguishable-colorsno longer errors on color functions containing spaces e.g.rgb(0, 0, 0)-- but also removed the rule (see above). - Fixed:
declaration-block-properties-orderno longer fails when an unspecified property comes before or after a specified property in a group withemptyLineBefore: true. - Fixed:
indentationno longer has false positives when there are empty lines within multi-line values. - Fixed:
declaration-colon-*-afterno longer fail to do their job when you want a space or newline after the colon and instead there is no space at all.
- Fixed:
no-unsupported-browser-featuresoptions now optional. - Fixed:
no-duplicate-selectorsnow ignores keyframe selectors.
- Deprecated:
"warn": truesecondary option. Use"severity": "warning", instead. - Deprecated:
color-no-namedrule. Use the newcolor-namedrule, with the"never"option instead. - Deprecated:
declaration-block-no-single-linerule. Use the newblock-no-single-linerule instead. - Deprecated:
rule-no-duplicate-propertiesrule. Use the newdeclaration-block-no-duplicate-propertiesrule instead. - Deprecated:
rule-no-shorthand-property-overridesrule. Use the newdeclaration-block-no-shorthand-property-overridesrule instead. - Deprecated:
rule-properties-orderrule. Use the newdeclaration-block-properties-orderrule instead. - Deprecated:
rule-trailing-semicolonrule. Use the newdeclaration-block-trailing-semicolonrule instead. - Deprecated
trueoption foremptyLineBeforewhen using property groups inrule-properties-order. Use the new"always"or"never"option instead. - Deprecated:
"always"option forfont-weight-notation. Use the newalways-where-possibleoption instead. - Added: universal
severitysecondary option as a replacement for"warn": trueto alter a rule's severity. - Added:
block-no-single-linerule. - Added:
color-namedrule. - Added:
declaration-block-no-duplicate-propertiesrule. - Added:
declaration-block-no-shorthand-property-overridesrule. - Added:
declaration-block-properties-orderrule. - Added:
declaration-block-trailing-semicolonrule. - Added:
max-nesting-depthrule. - Added:
no-browser-hacksrule. - Added:
no-descending-specificityrule. - Added:
no-indistinguishable-colorsrule. - Added:
no-unsupported-browser-featuresrule. - Added:
selector-max-specificityrule. - Added:
string-no-newlinerule. - Added:
"always"and"never"option torule-properties-orderemptyLineBeforewhen using property groups - Added:
named-where-possibleoption tofont-weight-notation. - Added:
unspecified: "bottomAlphabetical"option to therule-properties-orderrule. - Added:
ignoreAtRules: []option to theblock-opening-brace-space-beforeandblock-closing-brace-newline-afterrules. - Added: support for using the nesting selector (
&) as a prefix inselector-no-type. - Added:
stylelint-disable-linefeature. - Added:
withinComments,withinStrings, andcheckStringsoptions tostyleSearch, andinsideStringproperty to thestyleSearchmatch object. - Added:
resolveNestedSelectorsoption to theselector-class-patternrule. - Fixed: informative errors are thrown when
stylelint-disableis misused. - Fixed:
selector-no-vendor-prefixno longer delivers two warnings on vendor-prefixed pseudo-elements with two colons, e.g.::-moz-placeholder. - Fixed:
no-duplicate-selectorsrule now resolves nested selectors. - Fixed:
font-weight-notationdoes not throw false warnings whennormalis used in certain ways. - Fixed:
selector-no-*andselector-*-patternrules now ignore custom property sets. - Fixed: nested selector handling for
no-duplicate-selectors. - Fixed:
selector-no-iddoes not warn about Sass interpolation inside an:nth-child()argument. - Fixed: handling of mixed line endings in
rule-nested-empty-line-before,rule-non-nested-empty-line-before,comment-empty-line-beforeandat-rule-empty-line-before. - Fixed:
number-leading-zero,function-comma-space-*, anddeclaration-colon-*do not throw false positives inurl()arguments.
- Added:
ignore: "relative"option forfont-weight-notation. - Fixed:
declaration-colon-space/newline-before/afterrules now ignore scss maps. - Fixed:
selector-list-comma-newline-afterallows//comments after the comma.
- Fixed: removed
console.log()s inproperty-unit-whitelist.
- Fixed: removed
console.log()s inrule-properties-order.
- Fixed: option normalization for rules with primary options that are arrays of objects, like
rule-properties-order. - Fixed: accuracy of warning positions are
//comments when using SCSS parser. - Fixed:
no-unknown-animationsignores variables. - Fixed:
no-unknown-animationsdoes not erroneously flag functions likesteps()andcubic-bezier(). - Fixed: clarified error message in
time-no-imperceptible. - Fixed:
font-family-name-quotesandfont-weight-notationignore variables. - Fixed:
media-feature-no-missing-punctuationhandles space-padded media features. - Fixed: regression causing CLI
--configrelatives paths that don't start with./to be rejected.
- Fixed: again removed
stylelint.utils.ruleTesterbecause its dependencies broke things.
- Fixed: move
tapeto dependencies to supporttestUtils.
- Fixed: include
testUtilsin npm package whitelist.
- Added:
font-family-name-quotesrule. - Added:
font-weight-notationrule. - Added:
media-feature-no-missing-punctuationrule. - Added:
no-duplicate-selectorsrule. - Added:
no-invalid-double-slash-commentsrule. - Added:
no-unknown-animationsrule. - Added:
property-value-blacklistrule. - Added:
property-value-whitelistrule. - Added:
time-no-imperceptiblerule. - Added:
ignore: "descendant"andignore: "compounded"options forselector-no-type. - Added: support for regular expression property identification in
property-blacklist,property-unit-blacklist,property-unit-whitelist,property-value-blacklist, andproperty-whitelist. - Added: better handling of vendor prefixes in
property-unit-blacklistandproperty-unit-whitelist, e.g. if you enteranimationit now also checks-webkit-animation. - Added: support for using names of modules for the CLI's
--configargument, not just paths. - Added:
codeFilenameoption to Node API. - Added: exposed rules at
stylelint.rulesto make stylelint even more extensible. - Added: brought
stylelint-rule-testerinto this repo, and exposed it atstylelint.utils.ruleTester. - Fixed: bug in
rule-properties-orderempty line detection when the two newlines were separated by some other whitespace. - Fixed: option parsing bug that caused problems when using the
"alphabetical"primary option withrule-properties-order. - Fixed: regard an empty string as a valid CSS code.
- Fixed:
ignoreFileshandling of absolute paths. - Fixed:
ignoreFilesuses theconfigBasediroption to interpret relative paths.
- Added: support for custom messages with a
messagesecondary property on any rule. - Fixed: CLI always ignores contents of
node_modulesandbower_componentsdirectories. - Fixed: bug preventing CLI from understanding absolute paths in
--configargument. - Fixed: bug causing
indentationto stumble over declarations with semicolons on their own lines.
- Added: helpful option validation message when object is expected but non-object provided.
- Fixed:
selector-no-idno longer warns about Sass interpolation when multiple interpolations are used in a selector.
- Removed: support for legacy numbered severities.
- Added: support for extensions on
.stylelintrcfiles (by upgrading cosmiconfig). - Added:
ignore: "non-comments"option tomax-line-length. - Fixed:
function-whitespace-afterdoes not expect space between)and}, so it handles Sass interpolation better.
- Fixed:
selector-no-vendor-prefixnow handles custom-property-sets.
- Fixed:
selector-no-typeignoresnth-childpseudo-classes and@keyframesselectors.
- Fixed:
max-line-lengthhandlesurl()functions better. - Fixed:
block-opening-brace-newline-afteranddeclaration-block-semicolon-newline-afterhandle end-of-line comments better.
- Added:
legacyNumberedSeveritiesconfig property to force the legacy severity system. - Added:
selector-no-idignores Sass-style interpolation. - Fixed: bug causing extended config to override the config that extends it.
- Fixed: stopped hijacking
--configproperty in PostCSS and Node.js APIs. Still using it in the CLI.
- Fixed: bug preventing the disabling of rules analyzing the
rootnode, including:max-line-length,max-empty-lines,no-eol-whitespace,no-missing-eof-newline, andstring-quotes. - Fixed: bug causing
rule-properties-orderto get confused by properties with an unspecified order.
- Fixed: bug causing an error when
nullwas used on rules whose primary options are arrays.
- Fixed: Documentation improvements.
- Added:
stylelint-commandsignoreoption tocomment-empty-line-before. - Fixed: v3 regression causing bug in
rule-properties-orderand potentially other rules that accept arrays as primary options. - Fixed:
no-missing-eof-newlineno longer complains about completely empty files.
- Fixed: list of rules within documentation.
-
Removed:
nesting-block-opening-brace-space-beforeandnesting-block-opening-brace-newline-beforerules. -
Deprecated: numbered severities (0, 1, 2) and will be disabled in
4.0. -
Changed: renamed
rule-single-line-max-declarationstodeclaration-block-single-line-max-declarationsand changed scope of the single-line to the declaration block. -
Changed: renamed
rule-no-single-linetodeclaration-block-no-single-lineand changed scope of the single-line to the declaration block. -
Changed: renamed the
function-space-afterrule tofunction-whitespace-after. -
Changed: renamed the
comment-space-insiderule tocomment-whitespace-inside. -
Changed: renamed the
no-multiple-empty-linesrule tomax-empty-lines(takes anintas option). -
Changed:
pluginsis now an array instead of an object. And plugins should be created withstylelint.createPlugin(). -
Added: cosmiconfig, which means the following:
- support for YAML
.stylelintrc - support for
stylelint.config.js - support for
stylelintproperty inpackage.json - alternate config loading system, which stops at the first config found
- support for YAML
-
Added: asynchronicity to the PostCSS plugin.
-
Added:
ignoreFilesoption to config. -
Added:
configFileoption to Node.js API. -
Fixed:
comment-whitespace-insidenow ignores ignores copyright (/*!) and sourcemap (/*#) comments. -
Fixed:
rule-no-duplicate-propertiesnow ignores thesrcproperty.
- Fixed:
function-calc-no-unspaced-operatorignores characters in$sassand@lessvariables. - Fixed:
rule-properties-orderallows comments at the top of groups that expect newlines before them. - Fixed:
styleSearch()and the rules it powers will not trip up on single-line (//) comments. - Fixed:
selector-combinator-space-beforenow better handles nested selectors starting with combinators. - Fixed:
rule-properties-ordernow deals property with-moz-osx-font-smoothing.
- Fixed: improved documentation of CLI globbing possibilities.
- Fixed:
rule-properties-ordernow accounts for property names containing multiple hyphens. - Fixed:
rule-properties-ordergrouping bug.
- Added: error about undefined severities blaming stylelint for the bug.
- Fixed:
selector-pseudo-element-colon-notationtypo in rule name resulting in undefined severity.
- Fixed:
dist/build.
- Fixed:
property-whitelist,rule-no-duplicate-properties, andrule-properties-orderignore variables ($sass,@less, and--custom-property). - Fixed:
root-no-standard-propertiesignores$sassand@lessvariables. - Fixed:
comment-empty-line-beforeandcomment-space-insideno longer complain about//comments.
- Fixed:
number-no-trailing-zerosno longer flags at-import at-rules.
- Fixed:
selector-no-typeno longer flags the nesting selector (&).
- Added:
configFileoption to PostCSS plugin. - Fixed:
function-parentheses-newline-insideandfunction-parentheses-space-insidebug with nested functions.
- Added:
selector-class-patternrule. - Added:
selector-id-patternrule. - Added:
function-parentheses-newline-insiderule. - Added:
"always-single-line"and"never-single-line"options tofunction-parentheses-space-inside. - Fixed: CLI
syntaxargument bug.
- Added:
color-no-hexrule. - Added:
color-no-namedrule. - Added:
function-blacklistrule. - Added:
function-whitelistrule. - Added:
unit-blacklistrule. - Added:
unit-whitelistrule. - Added:
property-unit-blacklistrule. - Added:
property-unit-whitelistrule. - Added:
rule-single-line-max-declarationsrule. - Added:
max-line-lengthrule. - Added:
first-nestedexception tocomment-empty-line-before. - Added: single value options to
*-blacklist&-*whitelistrules e.g.{ "function-blacklist": "calc"} - Added: support for flexible groups to
rule-properties-order. - Added: support for an optional empty line between each group to
rule-properties-order. - Added: support for mathematical signs in front of Sass and Less variables in
function-calc-no-unspaced-operator. - Added: support for arbitrary whitespace after function in
function-space-after. - Added: support for arbitrary whitespace at the edge of comments in
comment-space-inside. - Fixed:
comment-space-insideallows any number of asterisks at the beginning and end of comments. - Fixed: bug causing
{ unspecified: "bottom }"option not to be applied withinrule-properties-order. - Fixed: bug causing
function-comma-*whitespace rules to improperly judge whether to enforce single- or multi-line options. - Fixed: bug when loading plugins from an extended config
- Fixed: indentation for function arguments, by ignoring them.
- Changed: plugins are now included and configured via a "locator", rather than either being
requiredor being inserted directly into the configuration object as a function. - Added: CLI.
- Added: standalone Node API.
- Added: quiet mode to CLI and Node API.
- Added: support for formatters, including custom ones, to CLI and Node API.
- Added:
stringandjsonformatters. - Added: support for using
.stylelintrcJSON file. - Added: support for extending existing configs using the
extendsproperty. - Added: support for SCSS syntax parsing to CLI and Node API.
- Added:
function-comma-newline-afterrule. - Added:
function-comma-newline-beforerule. - Added:
"always-single-line"and"never-single-line"options tofunction-comma-space-afterrule. - Added:
"always-single-line"and"never-single-line"options tofunction-comma-space-beforerule.
- Fixed: the
media-query-list-comma-*rules now only apply to@mediastatements.
- Added:
function-linear-gradient-no-nonstandard-directionrule. - Added:
rule-properties-ordernow by default ignores the order of properties left out of your specified array; and the options"top","bottom", and"ignore"are provided to change that behavior. - Added:
rule-properties-ordernow looks for roots of hyphenated properties in custom arrays so each extension (e.g.padding-topas an extension ofpadding) does not need to be specified individually. - Added:
"always-single-line"option todeclaration-colon-space-after. - Added: support for declarations directly on root (e.g. Sass variable declarations).
- Fixed:
declaration-colon-newline-after"always-multi-line"warning message.
- Added:
declaration-colon-newline-afterrule. - Added: the
indentationrule now checks indentation of multi-line at-rule params, unless there's theexceptoption ofparam. - Added: support for end-of-line comments in
selector-list-comma-newline-after. - Added: protection against
#${sass-interpolation}in rules checking for hex colors. - Added: support for strings (translated to RegExps) in
custom-property-patternandcustom-media-pattern. - Fixed: bug preventing various rules from registering the correct rule names in their warnings, and therefore also preventing them from being disabled with comments.
- Fixed: the
color-no-invalid-hexrule no longer flags hashes inurl()arguments. - Fixed: rules using
node.raw()instead ofnode.rawsto avoid expected errors.
- Fixed:
postcss-selector-parserupdated to improve location accuracy forselector-no-*rules.
- Removed: compatibility with PostCSS
4.x. - Added: compatibility with PostCSS
5.0.2+. - Fixed: the accuracy of reported line numbers and columns.
- Added:
after-commentignoreoption to theat-rule-empty-line-beforerule. - Fixed: the
indentationrule now correctly handles*hacks on property names. - Fixed: the
media-feature-colon-space-afterandmedia-feature-colon-space-beforerules now only apply to@mediastatements. - Fixed: the
rule-no-shorthand-property-overridesrule message is now consistent with the other messages.
- Added: invalid options cause the rule to abort instead of performing meaningless checks.
- Added: special warning for missing required options from
validateOptions().
- Fixed: npm package no longer includes test files (reducing package size by 500KB).
- Fixed: the
rule-properties-orderandrule-no-duplicate-propertiesrules now correctly check inside @rules.
- Added:
validateOptionstostylelint.utilsfor use by authors of custom rules. - Added:
custom-media-patternrule. - Added:
number-max-precisionrule.
- Added: validation of all rule options.
- Removed:
ruleTesterfromstylelint.utilsbecause of the additional dependencies it forces.
- Removed:
jsescdevDependency. - Added:
rule-no-shorthand-property-overridesrule. - Added:
ruleTestertostylelint.utilsfor use by authors of custom rules.
- Fixed:
hierarchicalSelectorsbug inindentationrule.
- Fixed:
~=is no longer mistaken for combinator inselector-combinator-space-*.
- Added: exposure of
report,ruleMessages, andstyleSearchinstylelint.utilsfor use by external plugin rules. - Added: plugin rule support.
- Added:
hierarchicalSelectorsoption toindentationrule. - Added:
nesting-block-opening-brace-space-beforerule. - Added:
nesting-block-opening-brace-newline-beforerule. - Fixed: the
color-hex-caserule message is now consistent with thecolor-hex-lengthrule. - Fixed: the
property-blacklistrule message is now consistent with theproperty-whitelistrule. - Fixed: a typo in the
comment-space-insiderule message.
- Added:
color-hex-caserule. - Added:
color-hex-lengthrule. - Fixed: formalized selector-indentation-checking within the
indentationrule. - Fixed: allow for arbitrary whitespace after the newline in the
selector-list-comma-newline-*rules. - Fixed:
selector-combinator-space-*no longer checks:nth-child()arguments.
- Fixed: nesting support for the
block-opening-brace-newline-beforerule. - Fixed: nesting support for the
block-opening-brace-space-beforerule. - Fixed: nesting support for the
rule-trailing-semicolonrule.
- Fixed: nesting support for the
rule-no-duplicate-propertiesrule. - Fixed: nesting support for the
rule-properties-orderrule. - Fixed: whitespace rules accommodate Windows CR-LF line endings.
- Added: ability to disable rules via comments in the CSS.
- Added:
at-rule-empty-line-beforerule. - Added:
at-rule-no-vendor-prefixrule. - Added:
block-closing-brace-newline-afterrule. - Added:
block-closing-brace-newline-beforerule. - Added:
block-closing-brace-space-afterrule. - Added:
block-closing-brace-space-beforerule. - Added:
block-no-emptyrule. - Added:
block-opening-brace-newline-afterrule. - Added:
block-opening-brace-newline-beforerule. - Added:
block-opening-brace-space-afterrule. - Added:
block-opening-brace-space-beforerule. - Added:
color-no-invalid-hexrule. - Added:
comment-empty-line-beforerule. - Added:
comment-space-insiderule. - Added:
custom-property-no-outside-rootrule. - Added:
custom-property-patternrule. - Added:
declaration-bang-space-afterrule. - Added:
declaration-bang-space-beforerule. - Added:
declaration-block-semicolon-newline-afterrule. - Added:
declaration-block-semicolon-newline-beforerule. - Added:
declaration-block-semicolon-space-afterrule. - Added:
declaration-block-semicolon-space-beforerule. - Added:
declaration-colon-space-afterrule. - Added:
declaration-colon-space-beforerule. - Added:
declaration-no-importantrule. - Added:
function-calc-no-unspaced-operatorrule. - Added:
function-comma-space-afterrule. - Added:
function-comma-space-beforerule. - Added:
function-parentheses-space-insiderule. - Added:
function-space-afterrule. - Added:
function-url-quotesrule. - Added:
indentationrule. - Added:
media-feature-colon-space-afterrule. - Added:
media-feature-colon-space-beforerule. - Added:
media-feature-name-no-vendor-prefixrule. - Added:
media-feature-range-operator-space-afterrule. - Added:
media-feature-range-operator-space-beforerule. - Added:
media-query-list-comma-newline-afterrule. - Added:
media-query-list-comma-newline-beforerule. - Added:
media-query-list-comma-space-afterrule. - Added:
media-query-list-comma-space-beforerule. - Added:
media-query-parentheses-space-insiderule. - Added:
no-eol-whitespacerule. - Added:
no-missing-eof-newlinerule. - Added:
no-multiple-empty-linesrule. - Added:
number-leading-zerorule. - Added:
number-no-trailing-zerosrule. - Added:
number-zero-length-no-unitrule. - Added:
property-blacklistrule. - Added:
property-no-vendor-prefixrule. - Added:
property-whitelistrule. - Added:
root-no-standard-propertiesrule. - Added:
rule-nested-empty-line-beforerule. - Added:
rule-no-duplicate-propertiesrule. - Added:
rule-no-single-linerule. - Added:
rule-non-nested-empty-line-beforerule. - Added:
rule-properties-orderrule. - Added:
rule-trailing-semicolonrule. - Added:
selector-combinator-space-afterrule. - Added:
selector-combinator-space-beforerule. - Added:
selector-list-comma-newline-afterrule. - Added:
selector-list-comma-newline-beforerule. - Added:
selector-list-comma-space-afterrule. - Added:
selector-list-comma-space-beforerule. - Added:
selector-no-attributerule. - Added:
selector-no-combinatorrule. - Added:
selector-no-idrule. - Added:
selector-no-typerule. - Added:
selector-no-universalrule. - Added:
selector-no-vendor-prefixrule. - Added:
selector-pseudo-element-colon-notationrule. - Added:
selector-root-no-compositionrule. - Added:
string-quotesrule. - Added:
value-list-comma-newline-afterrule. - Added:
value-list-comma-newline-beforerule. - Added:
value-list-comma-space-afterrule. - Added:
value-list-comma-space-beforerule. - Added:
value-no-vendor-prefixrule.