# table-header-reference

Rule `sonarjs/table-header-reference`. Table cells should reference their headers

- Source: sonarjs
- Technologies: JavaScript
- Kind: correctness
- Needs type information: no
- Autofix: no
- Reach: 6.2M weekly downloads of presets that enable it
- Trend: +62.1% last quarter
- Rank: #1372 by reach, #673 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `sonarjs/table-header-reference` | yes | no | package `eslint-plugin-sonarjs` | [docs](https://rules.sonarsource.com/javascript/RSPEC-5260/) |

## Enable it

### ESLint: `eslint.config.js`

```js
export default [
  {
    rules: {
      "sonarjs/table-header-reference": "error",
    },
  },
];
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [SonarJS recommended](https://lintradar.dev/presets/sonarjs-recommended.md) | ESLint | `eslint-plugin-sonarjs` | 230 | 6.2M | +62.1% |

## Related rules

- [sonarjs/table-header](https://lintradar.dev/rules/sonarjs/table-header.md): Tables should have headers
- [sonarjs/test-check-exception](https://lintradar.dev/rules/sonarjs/test-check-exception.md): Tests should check which exception is thrown
- [sonarjs/synchronous-suite-callback](https://lintradar.dev/rules/sonarjs/synchronous-suite-callback.md): Tests should not be registered asynchronously in suite callbacks
- [sonarjs/testing-library-prefer-query-by-disappearance](https://lintradar.dev/rules/sonarjs/testing-library-prefer-query-by-disappearance.md): Testing Library disappearance waits should use non-throwing queries
- [sonarjs/synchronous-exception-assertions](https://lintradar.dev/rules/sonarjs/synchronous-exception-assertions.md): Synchronous exception assertions should receive synchronous callbacks
- [sonarjs/testing-library-query-assertion](https://lintradar.dev/rules/sonarjs/testing-library-query-assertion.md): Testing Library queries should match presence assertions

---

Web page: https://lintradar.dev/rules/sonarjs/table-header-reference. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
