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.
| Rule | Setting | Files | What it checks | Why |
|---|---|---|---|---|
keyframe-selector-notation | off | SCSS | — | Off: a notation choice, not a mistake. |
no-descending-specificity | warning | SCSS | — | Warn: often a false alarm with nesting; check that the later, weaker selector is not overridden. |
no-duplicate-selectors | off | SCSS | — | — |
selector-anb-no-unmatchable | error | SCSS | — | — |
selector-attribute-name-disallowed-list | off | SCSS | — | — |
selector-attribute-operator-allowed-list | off | SCSS | — | — |
selector-attribute-operator-disallowed-list | off | SCSS | — | — |
selector-attribute-quotes | off | SCSS | — | Off: a notation choice, not a mistake. |
selector-class-pattern | warning, "^([a-z][a-z0-9]*)(-[a-z0-9]+)*$" | SCSS | — | — |
selector-combinator-allowed-list | off | SCSS | — | — |
selector-combinator-disallowed-list | off | SCSS | — | — |
selector-disallowed-list | off | SCSS | — | — |
selector-id-pattern | off | SCSS | — | Off: a naming convention the code review is enough for. |
selector-max-attribute | off | SCSS | — | — |
selector-max-class | off | SCSS | — | — |
selector-max-combinators | off | SCSS | — | — |
selector-max-compound-selectors | warning, 4 | SCSS | — | Custom: a selector of more than 4 parts is fragile. |
selector-max-id | warning, 0 | SCSS | — | Custom: an #id selector is too specific to override; use a class. |
selector-max-pseudo-class | off | SCSS | — | — |
selector-max-specificity | off | SCSS | — | — |
selector-max-type | off | SCSS | — | — |
selector-max-universal | off | SCSS | — | — |
selector-nested-pattern | off | SCSS | — | — |
selector-no-deprecated | off | SCSS | — | — |
selector-no-invalid | off | SCSS | — | — |
selector-no-qualifying-type | off | SCSS | — | — |
selector-no-unmatchable | off | SCSS | — | — |
selector-no-vendor-prefix | off | SCSS | — | Off: the Angular build adds the vendor prefixes. |
selector-not-notation | off | SCSS | — | Off: a notation choice, not a mistake. |
selector-pseudo-class-allowed-list | off | SCSS | — | — |
selector-pseudo-class-disallowed-list | off | SCSS | — | — |
selector-pseudo-class-no-unknown | error | SCSS | — | — |
selector-pseudo-element-allowed-list | off | SCSS | — | — |
selector-pseudo-element-colon-notation | off | SCSS | — | Off: a notation choice, not a mistake. |
selector-pseudo-element-disallowed-list | warning, ["ng-deep"] | SCSS | — | Custom: ::ng-deep is deprecated by Angular; style a child through its inputs or CSS custom properties. |
selector-pseudo-element-no-unknown | error, {"ignorePseudoElements":["ng-deep"]} | SCSS | — | Custom: ::ng-deep is known (selector-pseudo-element-disallowed-list warns about it). |
selector-type-case | off | SCSS | — | Off: a notation choice, not a mistake. |
selector-type-no-unknown | error, {"ignore":["custom-elements"]} | SCSS | — | Custom: Angular component selectors (app-user-list) are custom elements. |