# no-bad-blocks

Rule `jsdoc/no-bad-blocks`. This rule checks for multi-line-style comments which fail to meet the criteria of a JSDoc block.

- Source: jsdoc
- Technologies: JSDoc
- 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: #1631 by reach, #1642 by growth

## Linters

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

## Code examples

### Incorrect: the rule reports this

```ts
/*
 * @param foo
 */
function quux (foo) {
```

### Correct: the rule accepts this

```ts
/**
 * @property foo
 */
```

Examples from the ESLint documentation.

## Enable it

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

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

export default [
  {
    plugins: { jsdoc },
    rules: {
      "jsdoc/no-bad-blocks": "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/informative-docs](https://lintradar.dev/rules/jsdoc/informative-docs.md): This rule reports doc comments that only restate their attached name.
- [jsdoc/no-blank-block-descriptions](https://lintradar.dev/rules/jsdoc/no-blank-block-descriptions.md): If tags are present, this rule will prevent empty lines in the block description. If no tags are present, this rule will prevent extra empty lines in the block description.
- [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/require-asterisk-prefix](https://lintradar.dev/rules/jsdoc/require-asterisk-prefix.md): Requires that each JSDoc line starts with an `*`.
- [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/require-description](https://lintradar.dev/rules/jsdoc/require-description.md): Requires that all functions (and potentially other contexts) have a description.

---

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