Skip to content

stylelint/rules/declarations ​

on save: the property order, the Prettier formatting (never disabled); warning = a choice to justify (disabled for one line, with a reason). Notations are free. Declarations and properties: duplicates, shorthands, !important, custom properties.

25 rules, 10 on. Source: lint/stylelint/rules/declarations.mjs.

RuleSettingFilesWhat it checksWhy
block-no-emptyerrorSCSS——
block-no-redundant-nested-style-rulesoffSCSS—Off: a notation choice, not a mistake.
custom-property-empty-line-beforeoffSCSS—Off: formatting, checked by prettier/prettier.
custom-property-no-missing-var-functionerrorSCSS——
custom-property-patternwarning, "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$"SCSS——
declaration-block-no-duplicate-custom-propertieserrorSCSS——
declaration-block-no-duplicate-propertieserror, {"ignore":["consecutive-duplicates-with-different-syntaxe…SCSS——
declaration-block-no-redundant-longhand-propertiesoffSCSS—Off: a notation choice, not a mistake.
declaration-block-no-shorthand-property-overrideserrorSCSS——
declaration-block-single-line-max-declarationsoffSCSS—Off: formatting, checked by prettier/prettier.
declaration-empty-line-beforeoffSCSS—Off: formatting, checked by prettier/prettier.
declaration-no-importantwarningSCSS—Custom: !important wins over everything; justify it where it is needed.
declaration-property-max-valuesoffSCSS——
declaration-property-unit-allowed-listoffSCSS——
declaration-property-unit-disallowed-listoffSCSS——
declaration-property-value-allowed-listoffSCSS——
declaration-property-value-keyword-no-deprecatederrorSCSS——
declaration-property-value-no-unknownoffSCSS——
property-allowed-listoffSCSS——
property-disallowed-listoffSCSS——
property-layout-mappingsoffSCSS——
property-no-deprecatederrorSCSS——
property-no-unknownerrorSCSS——
property-no-vendor-prefixoffSCSS—Off: the Angular build adds the vendor prefixes.
shorthand-property-no-redundant-valuesoffSCSS—Off: a notation choice, not a mistake.

Generated from the JSDoc of the sources.