# todo-tag

Rule `sonarjs/todo-tag`. Track uses of "TODO" tags

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

## Linters

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

## Code examples

### Incorrect: the rule reports this

```js
function doSomething() {
  // TODO
}
```

Examples from the ESLint documentation.

## Enable it

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

```js
export default [
  {
    rules: {
      "sonarjs/todo-tag": "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/testing-library-query-assertion](https://lintradar.dev/rules/sonarjs/testing-library-query-assertion.md): Testing Library queries should match presence assertions
- [sonarjs/unused-import](https://lintradar.dev/rules/sonarjs/unused-import.md): Unnecessary imports should be removed
- [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/unused-named-groups](https://lintradar.dev/rules/sonarjs/unused-named-groups.md): Names of regular expressions named groups should be used
- [sonarjs/test-check-exception](https://lintradar.dev/rules/sonarjs/test-check-exception.md): Tests should check which exception is thrown
- [sonarjs/unverified-certificate](https://lintradar.dev/rules/sonarjs/unverified-certificate.md): Server certificates should be verified during SSL/TLS connections

---

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