Skip to content

stylelint/rules/selectors ​

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. Selectors: validity, specificity, patterns, nesting of selectors, Angular custom elements and ::ng-deep.

38 rules, 9 on. Source: lint/stylelint/rules/selectors.mjs.

RuleSettingFilesWhat it checksWhy
keyframe-selector-notationoffSCSS—Off: a notation choice, not a mistake.
no-descending-specificitywarningSCSS—Warn: often a false alarm with nesting; check that the later, weaker selector is not overridden.
no-duplicate-selectorsoffSCSS——
selector-anb-no-unmatchableerrorSCSS——
selector-attribute-name-disallowed-listoffSCSS——
selector-attribute-operator-allowed-listoffSCSS——
selector-attribute-operator-disallowed-listoffSCSS——
selector-attribute-quotesoffSCSS—Off: a notation choice, not a mistake.
selector-class-patternwarning, "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$"SCSS——
selector-combinator-allowed-listoffSCSS——
selector-combinator-disallowed-listoffSCSS——
selector-disallowed-listoffSCSS——
selector-id-patternoffSCSS—Off: a naming convention the code review is enough for.
selector-max-attributeoffSCSS——
selector-max-classoffSCSS——
selector-max-combinatorsoffSCSS——
selector-max-compound-selectorswarning, 4SCSS—Custom: a selector of more than 4 parts is fragile.
selector-max-idwarning, 0SCSS—Custom: an #id selector is too specific to override; use a class.
selector-max-pseudo-classoffSCSS——
selector-max-specificityoffSCSS——
selector-max-typeoffSCSS——
selector-max-universaloffSCSS——
selector-nested-patternoffSCSS——
selector-no-deprecatedoffSCSS——
selector-no-invalidoffSCSS——
selector-no-qualifying-typeoffSCSS——
selector-no-unmatchableoffSCSS——
selector-no-vendor-prefixoffSCSS—Off: the Angular build adds the vendor prefixes.
selector-not-notationoffSCSS—Off: a notation choice, not a mistake.
selector-pseudo-class-allowed-listoffSCSS——
selector-pseudo-class-disallowed-listoffSCSS——
selector-pseudo-class-no-unknownerrorSCSS——
selector-pseudo-element-allowed-listoffSCSS——
selector-pseudo-element-colon-notationoffSCSS—Off: a notation choice, not a mistake.
selector-pseudo-element-disallowed-listwarning, ["ng-deep"]SCSS—Custom: ::ng-deep is deprecated by Angular; style a child through its inputs or CSS custom properties.
selector-pseudo-element-no-unknownerror, {"ignorePseudoElements":["ng-deep"]}SCSS—Custom: ::ng-deep is known (selector-pseudo-element-disallowed-list warns about it).
selector-type-caseoffSCSS—Off: a notation choice, not a mistake.
selector-type-no-unknownerror, {"ignore":["custom-elements"]}SCSS—Custom: Angular component selectors (app-user-list) are custom elements.

Generated from the JSDoc of the sources.