# useDeprecatedReason

Rule `biome/useDeprecatedReason`. Require a reason when using the `@deprecated` directive.

- Source: biome
- Technologies: GraphQL
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #590 by reach, #225 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `style/useDeprecatedReason` | yes | no | group style, since 1.9.0 | [docs](https://biomejs.dev/linter/rules/use-deprecated-reason/) |

## Code examples

### Incorrect: the rule reports this

```graphql
query {
  member @deprecated
}
```

### Correct: the rule accepts this

```graphql
query {
  member @deprecated(reason: "Why?")
}
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "style": {
        "useDeprecatedReason": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/useConvexExplicitTableIds](https://lintradar.dev/rules/biome/useConvexExplicitTableIds.md): Require the table name as the first argument of Convex database calls.
- [biome/useGenericFontNames](https://lintradar.dev/rules/biome/useGenericFontNames.md): Require a generic fallback in font-family lists.
- [biome/useConvexArgsValidator](https://lintradar.dev/rules/biome/useConvexArgsValidator.md): Require an `args` validator in Convex queries, mutations, and actions.
- [biome/useGraphqlNamedOperations](https://lintradar.dev/rules/biome/useGraphqlNamedOperations.md): Require a name for every explicit GraphQL operation definition.
- [biome/useConvexAccessControl](https://lintradar.dev/rules/biome/useConvexAccessControl.md): Require public Convex functions to call an access control function.
- [biome/useImageSize](https://lintradar.dev/rules/biome/useImageSize.md): Enforces that `<img>` elements have both width and height attributes.

---

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