# no-sonar-comments

Rule `sonarjs/no-sonar-comments`. Track uses of "NOSONAR" comments

- Source: sonarjs
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #2163 by reach

## Linters

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

## Enable it

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

```js
export default [
  {
    rules: {
      "sonarjs/no-sonar-comments": "error",
    },
  },
];
```

## Related rules

- [sonarjs/no-return-type-any](https://lintradar.dev/rules/sonarjs/no-return-type-any.md): Primitive return types should be used
- [sonarjs/no-require-or-define](https://lintradar.dev/rules/sonarjs/no-require-or-define.md): "import" should be used to include external code
- [sonarjs/no-undefined-assignment](https://lintradar.dev/rules/sonarjs/no-undefined-assignment.md): "undefined" should not be assigned
- [sonarjs/no-reference-error](https://lintradar.dev/rules/sonarjs/no-reference-error.md): Variables should be defined before being used
- [sonarjs/no-unused-function-argument](https://lintradar.dev/rules/sonarjs/no-unused-function-argument.md): Unused function parameters should be removed
- [sonarjs/no-networkidle-wait](https://lintradar.dev/rules/sonarjs/no-networkidle-wait.md): Playwright "networkidle" waits should not be used

---

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