selector-attribute-name-disallowed-list
What it does
Section titled “What it does”Reports an attribute selector whose name is in the list option.
Why it matters
Section titled “Why it matters”A project can forbid selecting on an attribute such as style, whose value is generated or changes without notice. The rule is a policy: with no list it reports nothing.
Example
Section titled “Example”...}a:hover::before > b[style] { color: red; width: calc(1px + 2px); --x: 1em }...Configuration
Section titled “Configuration”css: lint: rules: selector-attribute-name-disallowed-list: level: warn # off (default), warn, error options: list: []less: lint: rules: selector-attribute-name-disallowed-list: level: warn # off (default), warn, error options: list: []scss: lint: rules: selector-attribute-name-disallowed-list: level: warn # off (default), warn, error options: list: []| Option | Type | Default | Description |
|---|---|---|---|
list |
list | [] |
The disallowed attribute names: names, or /regex/. |
Suppress one line with sudsy-disable-next-line selector-attribute-name-disallowed-list in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| stylelint | selector-attribute-name-disallowed-list |
full |