# check-indentation

Rule `jsdoc/check-indentation`. Reports invalid padding inside JSDoc blocks.

- Source: jsdoc
- Technologies: JSDoc
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 413K weekly downloads of presets that enable it
- Trend: −5.0% last quarter
- Rank: #1625 by reach, #1636 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `jsdoc/check-indentation` | no | no | package `eslint-plugin-jsdoc` | [docs](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-indentation.md#repos-sticky-header) |

## Code examples

### Incorrect: the rule reports this

```ts
/**  Indented on first line
*/
```

### Correct: the rule accepts this

````js
/**
 * Some description:
 * ```html
 * <section>
 *   <title>test</title>
 * </section>
 * ```
 */
````

Examples from the ESLint documentation.

## Enable it

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

```js
import jsdoc from "eslint-plugin-jsdoc";

export default [
  {
    plugins: { jsdoc },
    rules: {
      "jsdoc/check-indentation": "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

- [jsdoc/check-line-alignment](https://lintradar.dev/rules/jsdoc/check-line-alignment.md): Reports invalid alignment of JSDoc block lines.
- [jsdoc/check-syntax](https://lintradar.dev/rules/jsdoc/check-syntax.md): Reports against syntax not valid for the mode (e.g., Google Closure Compiler in non-Closure mode).
- [jsdoc/check-template-names](https://lintradar.dev/rules/jsdoc/check-template-names.md): Checks that any `@template` names are actually used in the connected `@typedef` or type alias.
- [jsdoc/imports-as-dependencies](https://lintradar.dev/rules/jsdoc/imports-as-dependencies.md): Reports if JSDoc `import()` statements point to a package which is not listed in `dependencies` or `devDependencies`
- [jsdoc/informative-docs](https://lintradar.dev/rules/jsdoc/informative-docs.md): This rule reports doc comments that only restate their attached name.
- [jsdoc/no-bad-blocks](https://lintradar.dev/rules/jsdoc/no-bad-blocks.md): This rule checks for multi-line-style comments which fail to meet the criteria of a JSDoc block.

---

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