table-scope
Angular templatesHTMLVue / SvelteVue / Sveltecorrectnessno fixdefault: offhtml/angular-eslint-recommended
What it does
Section titled “What it does”Reports a scope attribute on an element other than <th>.
Why it matters
Section titled “Why it matters”scope tells assistive technology which cells a header cell labels. On any other element it has no meaning and is ignored, so the table is no easier to read than without it, while the attribute suggests that it is.
Example
Section titled “Example”...<td scope="row"></td><th scope="row"></th>...Configuration
Section titled “Configuration”angular: lint: rules: table-scope: warn # off (default), warn, errorhtml: lint: rules: table-scope: warn # off (default), warn, errorsvelte: lint: rules: table-scope: warn # off (default), warn, errorvue: lint: rules: table-scope: warn # off (default), warn, errorEnabled by the presets: html/angular-eslint-recommended.
Suppress one line with sudsy-disable-next-line table-scope 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 |
|---|---|---|
| angular-eslint | table-scope |
full |