# capitalized-comments

Rule `eslint/capitalized-comments`. Enforce or disallow capitalization of the first letter of a comment

- Source: eslint
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 413K weekly downloads of presets that enable it
- Trend: −5.0% last quarter
- Rank: #1616 by reach, #1627 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `capitalized-comments` | no | safe | package `eslint` | [docs](https://eslint.org/docs/latest/rules/capitalized-comments) |
| Oxlint | `capitalized-comments` | no | safe | plugin `eslint`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/eslint/capitalized-comments.html) |

## Code examples

### Incorrect: the rule reports this

```js
// lowercase comment
```

### Correct: the rule accepts this

```js
// Capitalized comment

// 1. Non-letter at beginning of comment

// 丈 Non-Latin character at beginning of comment

/* istanbul ignore next */
/* jscs:enable */
/* jshint asi:true */
/* global foo */
/* globals foo */
/* exported myVar */
// https://github.com

/* eslint semi:2 */
/* eslint-disable */
foo
/* eslint-enable */
// eslint-disable-next-line
baz
bar // eslint-disable-line
```

Examples from the ESLint documentation.

## Enable it

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

```js
export default [
  {
    rules: {
      "capitalized-comments": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "capitalized-comments": "error"
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |

## Related rules

- [eslint/no-implicit-coercion](https://lintradar.dev/rules/eslint/no-implicit-coercion.md): Disallow shorthand type conversions
- [eslint/max-params](https://lintradar.dev/rules/eslint/max-params.md): Enforce a maximum number of parameters in function definitions
- [eslint/max-lines](https://lintradar.dev/rules/eslint/max-lines.md): Enforce a maximum number of lines per file
- [eslint/max-depth](https://lintradar.dev/rules/eslint/max-depth.md): Enforce a maximum depth that blocks can be nested
- [eslint/no-invalid-this](https://lintradar.dev/rules/eslint/no-invalid-this.md): Disallow use of `this` in contexts where the value of `this` is `undefined`
- [eslint/require-atomic-updates](https://lintradar.dev/rules/eslint/require-atomic-updates.md): Disallow assignments that can lead to race conditions due to usage of `await` or `yield`

---

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