# require-throws

Rule `jsdoc/require-throws`. Requires that throw statements are documented with `@throws` tags.

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

## Linters

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

## Code examples

### Incorrect: the rule reports this

```ts
/**
 * @throws {never}
 */
function quux () {
  throw new Error('err')
}
```

### Correct: the rule accepts this

```ts
/**
 *
 */
function quux () {
  throw new Error('err')
}
```

Examples from the ESLint documentation.

## Enable it

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

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

export default [
  {
    plugins: { jsdoc },
    rules: {
      "jsdoc/require-throws": "error",
    },
  },
];
```

## Related rules

- [jsdoc/require-template](https://lintradar.dev/rules/jsdoc/require-template.md): Requires `@template` tags be present when type parameters are used.
- [jsdoc/sort-tags](https://lintradar.dev/rules/jsdoc/sort-tags.md): Sorts tags by a specified sequence according to tag name, optionally adding line breaks between tag groups.
- [jsdoc/require-tags](https://lintradar.dev/rules/jsdoc/require-tags.md): Requires tags be present, optionally for specific contexts
- [jsdoc/text-escaping](https://lintradar.dev/rules/jsdoc/text-escaping.md): Auto-escape certain characters that are input within block and tag descriptions.
- [jsdoc/require-rejects](https://lintradar.dev/rules/jsdoc/require-rejects.md): Requires that Promise rejections are documented with `@rejects` tags.
- [jsdoc/ts-ban-ts-comment](https://lintradar.dev/rules/jsdoc/ts-ban-ts-comment.md): Disallows (or requires descriptions for) `@ts-<directive>` comments, mirroring `@typescript-eslint/ban-ts-comment`.

---

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