# require-rejects

Rule `jsdoc/require-rejects`. Requires that Promise rejections are documented with `@rejects` 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: #2107 by reach

## Linters

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

## Code examples

### Incorrect: the rule reports this

```ts
/**
 *
 */
async function quux () {
  throw new Error('abc');
}
```

### Correct: the rule accepts this

```ts
/**
 * @rejects {Error}
 */
async function quux () {
  throw new Error('abc');
}
```

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-rejects": "error",
    },
  },
];
```

## Related rules

- [jsdoc/require-next-description](https://lintradar.dev/rules/jsdoc/require-next-description.md): Requires a description for `@next` tags
- [jsdoc/require-tags](https://lintradar.dev/rules/jsdoc/require-tags.md): Requires tags be present, optionally for specific contexts
- [jsdoc/require-hyphen-before-param-description](https://lintradar.dev/rules/jsdoc/require-hyphen-before-param-description.md): Requires a hyphen before the `@param` description (and optionally before `@property` descriptions).
- [jsdoc/require-template](https://lintradar.dev/rules/jsdoc/require-template.md): Requires `@template` tags be present when type parameters are used.
- [jsdoc/require-file-overview](https://lintradar.dev/rules/jsdoc/require-file-overview.md): Checks that all files have one `@file`, `@fileoverview`, or `@overview` tag at the beginning of the file.
- [jsdoc/require-throws](https://lintradar.dev/rules/jsdoc/require-throws.md): Requires that throw statements are documented with `@throws` tags.

---

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