no-deprecated-attr
Angular templatesHTMLVue / SvelteVue / Sveltecorrectnessno fixdefault: warnhtml/html-validate-standardhtml/html-eslint-recommended
What it does
Section titled “What it does”Reports an attribute that HTML5 no longer has on that element (align, bgcolor, border, …).
Why it matters
Section titled “Why it matters”Presentation in attributes is outdated and browsers may stop honoring it; it also overrides less specific CSS in surprising ways.
To fix, use CSS.
Example
Section titled “Example”...<div align="center">x</div>...<img src="a.png" alt="">...Configuration
Section titled “Configuration”angular: lint: rules: no-deprecated-attr: warn # off, warn (default), errorhtml: lint: rules: no-deprecated-attr: warn # off, warn (default), errorsvelte: lint: rules: no-deprecated-attr: warn # off, warn (default), errorvue: lint: rules: no-deprecated-attr: warn # off, warn (default), errorEnabled by the presets: html/html-validate-standard, html/html-eslint-recommended.
Suppress one line with sudsy-disable-next-line no-deprecated-attr 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 |
|---|---|---|
| html-eslint | no-obsolete-attrs |
full |
| html-validate | no-deprecated-attr |
full |