src/content/docs/linter/rules/no-header-scope.mdx
import { Tabs, TabItem } from '@astrojs/starlight/components';
<Tabs> <TabItem label="JSX and TSX" icon="seti:javascript"> ## Summary - Rule available since: `v1.0.0` - Diagnostic Category: [`lint/a11y/noHeaderScope`](/reference/diagnostics#diagnostic-category) - This rule is **recommended**, meaning it is enabled by default. - This rule has an [**unsafe**](/linter/#unsafe-fixes) fix. - The default severity of this rule is [**error**](/reference/diagnostics#error). - Sources: - Same as [`jsx-a11y/scope`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/scope.md){
"linter": {
"rules": {
"a11y": {
"noHeaderScope": "error"
}
}
}
}
The scope prop should be used only on <th> elements.
<div scope={scope} />
<div scope="col" />
<th scope={scope}></th>
<th scope="col"></th>
{
"linter": {
"rules": {
"a11y": {
"noHeaderScope": "error"
}
}
}
}
The scope prop should be used only on <th> elements.
<div scope="col"></div>
<div scope></div>
<th scope="col"></th>
<th scope></th>