Skip to content

Rules ​

Here are stylelint-stylistic rules, grouped by the thing they apply to.

86 / 86
RuleDescriptionThingFixable
color-hex-caseSpecify lowercase or uppercase for hex colorsColorfix
function-comma-newline-afterRequire a newline or disallow whitespace after the commas of functionsFunctionfix
function-comma-newline-beforeRequire a newline or disallow whitespace before the commas of functionsFunctionfix
function-comma-space-afterRequire a single space or disallow whitespace after the commas of functionsFunctionfix
function-comma-space-beforeRequire a single space or disallow whitespace before the commas of functionsFunctionfix
function-max-empty-linesLimit the number of adjacent empty lines within functionsFunctionfix
function-parentheses-newline-insideRequire a newline or disallow whitespace on the inside of the parentheses of functionsFunctionfix
function-parentheses-space-insideRequire a single space or disallow whitespace on the inside of the parentheses of functionsFunctionfix
function-whitespace-afterRequire or disallow whitespace after functionsFunctionfix
number-leading-zeroRequire or disallow a leading zero for fractional numbers less than 1Numberfix
number-no-trailing-zerosDisallow trailing zeros in numbersNumberfix
string-quotesSpecify single or double quotes around stringsStringfix
unit-caseSpecify lowercase or uppercase for unitsUnitfix
value-slash-newline-afterRequire a newline or disallow whitespace after the solidus that separates the parts of a valueValuefix
value-slash-newline-beforeRequire a newline or disallow whitespace before the solidus that separates the parts of a valueValuefix
value-slash-space-afterRequire a single space or disallow whitespace after the solidus that separates the parts of a valueValuefix
value-slash-space-beforeRequire a single space or disallow whitespace before the solidus that separates the parts of a valueValuefix
value-list-comma-newline-afterRequire a newline or disallow whitespace after the commas of value listsValue listfix
value-list-comma-newline-beforeRequire a newline or disallow whitespace before the commas of value listsValue listfix
value-list-comma-space-afterRequire a single space or disallow whitespace after the commas of value listsValue listfix
value-list-comma-space-beforeRequire a single space or disallow whitespace before the commas of value listsValue listfix
value-list-max-empty-linesLimit the number of adjacent empty lines within value listsValue listfix
property-caseSpecify lowercase or uppercase for propertiesPropertyfix
declaration-bang-space-afterRequire a single space or disallow whitespace after the bang of declarationsDeclarationfix
declaration-bang-space-beforeRequire a single space or disallow whitespace before the bang of declarationsDeclarationfix
declaration-colon-newline-afterRequire a newline or disallow whitespace after the colon of declarationsDeclarationfix
declaration-colon-space-afterRequire a single space or disallow whitespace after the colon of declarationsDeclarationfix
declaration-colon-space-beforeRequire a single space or disallow whitespace before the colon of declarationsDeclarationfix
declaration-block-semicolon-newline-afterRequire a newline or disallow whitespace after the semicolons of declaration blocksDeclaration blockfix
declaration-block-semicolon-newline-beforeRequire a newline or disallow whitespace before the semicolons of declaration blocksDeclaration blockfix
declaration-block-semicolon-space-afterRequire a single space or disallow whitespace after the semicolons of declaration blocksDeclaration blockfix
declaration-block-semicolon-space-beforeRequire a single space or disallow whitespace before the semicolons of declaration blocksDeclaration blockfix
declaration-block-single-line-max-declarationsLimit the number of declarations within a single-line declaration blockDeclaration blockfix
declaration-block-trailing-semicolonRequire or disallow a trailing semicolon within declaration blocksDeclaration blockfix
block-closing-brace-empty-line-beforeRequire or disallow an empty line before the closing brace of blocksBlockfix
block-closing-brace-newline-afterRequire a newline or disallow whitespace after the closing brace of blocksBlockfix
block-closing-brace-newline-beforeRequire a newline or disallow whitespace before the closing brace of blocksBlockfix
block-closing-brace-space-afterRequire a single space or disallow whitespace after the closing brace of blocksBlockfix
block-closing-brace-space-beforeRequire a single space or disallow whitespace before the closing brace of blocksBlockfix
block-opening-brace-newline-afterRequire a newline after the opening brace of blocksBlockfix
block-opening-brace-newline-beforeRequire a newline or disallow whitespace before the opening brace of blocksBlockfix
block-opening-brace-space-afterRequire a single space or disallow whitespace after the opening brace of blocksBlockfix
block-opening-brace-space-beforeRequire a single space or disallow whitespace before the opening brace of blocksBlockfix
selector-attribute-brackets-space-insideRequire a single space or disallow whitespace on the inside of the brackets within attribute selectorsSelectorfix
selector-attribute-operator-space-afterRequire a single space or disallow whitespace after operators within attribute selectorsSelectorfix
selector-attribute-operator-space-beforeRequire a single space or disallow whitespace before operators within attribute selectorsSelectorfix
selector-combinator-space-afterRequire a single space or disallow whitespace after the combinators of selectorsSelectorfix
selector-combinator-space-beforeRequire a single space or disallow whitespace before the combinators of selectorsSelectorfix
selector-descendant-combinator-no-non-spaceDisallow non-space characters for descendant combinators of selectorsSelectorfix
selector-max-empty-linesLimit the number of adjacent empty lines within selectorsSelectorfix
selector-pseudo-class-caseSpecify lowercase or uppercase for pseudo-class selectorsSelectorfix
selector-pseudo-class-parentheses-space-insideRequire a single space or disallow whitespace on the inside of the parentheses within pseudo-class selectorsSelectorfix
selector-pseudo-element-caseSpecify lowercase or uppercase for pseudo-element selectorsSelectorfix
selector-list-comma-newline-afterRequire a newline or disallow whitespace after the commas of selector listsSelector listfix
selector-list-comma-newline-beforeRequire a newline or disallow whitespace before the commas of selector listsSelector listfix
selector-list-comma-space-afterRequire a single space or disallow whitespace after the commas of selector listsSelector listfix
selector-list-comma-space-beforeRequire a single space or disallow whitespace before the commas of selector listsSelector listfix
media-feature-colon-space-afterRequire a single space or disallow whitespace after the colon in media featuresMedia featurefix
media-feature-colon-space-beforeRequire a single space or disallow whitespace before the colon in media featuresMedia featurefix
media-feature-name-caseSpecify lowercase or uppercase for media feature namesMedia featurefix
media-feature-parentheses-space-insideRequire a single space or disallow whitespace on the inside of the parentheses within media featuresMedia featurefix
media-feature-range-operator-space-afterRequire a single space or disallow whitespace after the range operator in media featuresMedia featurefix
media-feature-range-operator-space-beforeRequire a single space or disallow whitespace before the range operator in media featuresMedia featurefix
media-feature-slash-space-afterRequire a single space or disallow whitespace after the solidus of a ratio in media featuresMedia featurefix
media-feature-slash-space-beforeRequire a single space or disallow whitespace before the solidus of a ratio in media featuresMedia featurefix
media-query-list-comma-newline-afterRequire a newline or disallow whitespace after the commas of media query listsMedia query listfix
media-query-list-comma-newline-beforeRequire a newline or disallow whitespace before the commas of media query listsMedia query listfix
media-query-list-comma-space-afterRequire a single space or disallow whitespace after the commas of media query listsMedia query listfix
media-query-list-comma-space-beforeRequire a single space or disallow whitespace before the commas of media query listsMedia query listfix
at-rule-name-caseSpecify lowercase or uppercase for at-rules namesAt-rulefix
at-rule-name-newline-afterRequire a newline after at-rule namesAt-rulefix
at-rule-name-space-afterRequire a single space after at-rule namesAt-rulefix
at-rule-semicolon-newline-afterRequire a newline after the semicolon of at-rulesAt-rulefix
at-rule-semicolon-space-beforeRequire a single space or disallow whitespace before the semicolons of at-rulesAt-rulefix
aspect-ratio-notationSpecify the notation for the value of `aspect-ratio`Aspect ratiofix
named-grid-areas-alignmentRequire cell tokens (and optionally ending quotes) within `grid-template-areas` to be alignedNamed grid areasfix
indentationSpecify indentationGeneral / Sheetfix
linebreaksSpecify unix or windows linebreaksGeneral / Sheetfix
max-empty-linesLimit the number of adjacent empty linesGeneral / Sheetfix
max-line-lengthLimit the length of a lineGeneral / Sheet
no-empty-first-lineDisallow empty first linesGeneral / Sheetfix
no-eol-whitespaceDisallow end-of-line whitespaceGeneral / Sheetfix
no-multiple-whitespacesDisallow multiple whitespaces between property values and function argumentsGeneral / Sheetfix
no-extra-semicolonsDisallow extra semicolonsGeneral / Sheetfix
no-missing-end-of-source-newlineDisallow missing end-of-source newlinesGeneral / Sheetfix
unicode-bomRequire or disallow Unicode BOMGeneral / Sheetfix

Released under the MIT License.