attribute-empty-style
What it does
Section titled “What it does”Reports an attribute whose empty value means the same as no value (hidden="", crossorigin="").
Why it matters
Section titled “Why it matters”="" adds characters and no meaning, and the two spellings of the same thing make the files inconsistent.
To fix, write the attribute without ="".
Example
Section titled “Example”...<img src="a.png" alt="">...<p hidden="">x</p><p hidden>x</p>...Configuration
Section titled “Configuration”angular: lint: rules: attribute-empty-style: warn # off (default), warn, errorhtml: lint: rules: attribute-empty-style: warn # off (default), warn, errorsvelte: lint: rules: attribute-empty-style: warn # off (default), warn, errorvue: lint: rules: attribute-empty-style: warn # off (default), warn, errorEnabled by the presets: html/html-validate-recommended.
Suppress one line with sudsy-disable-next-line attribute-empty-style in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.
| Tool | Rule | Match | What differs |
|---|---|---|---|
| html-validate | attribute-empty-style |
partial | the omit style only, without the style option |