# useConvexArgsValidator

Rule `biome/useConvexArgsValidator`. Require an `args` validator in Convex queries, mutations, and actions.

- Source: biome
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #588 by reach, #223 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/useConvexArgsValidator` | yes | unsafe | group nursery, since 2.6.10 | [docs](https://biomejs.dev/linter/rules/use-convex-args-validator/) |

## Code examples

### Incorrect: the rule reports this

```ts
export const get = query({
    handler: async (ctx, { id }: { id: Id<"tasks"> }) => {
        return await ctx.db.get(id);
    },
});
```

```js
export const list = query({
    handler: async (ctx) => {
        return await ctx.db.query("tasks").collect();
    },
});
```

```js
export const list = query(async (ctx) => {
    return await ctx.db.query("tasks").collect();
});
```

### Correct: the rule accepts this

```js
export const get = query({
    args: { id: v.id("tasks") },
    handler: async (ctx, { id }) => {
        return await ctx.db.get(id);
    },
});

export const list = query({
    args: {},
    handler: async (ctx) => {
        return await ctx.db.query("tasks").collect();
    },
});
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "useConvexArgsValidator": "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/useConvexAccessControl](https://lintradar.dev/rules/biome/useConvexAccessControl.md): Require public Convex functions to call an access control function.
- [biome/useConvexExplicitTableIds](https://lintradar.dev/rules/biome/useConvexExplicitTableIds.md): Require the table name as the first argument of Convex database calls.
- [biome/useConsistentObjectKeys](https://lintradar.dev/rules/biome/useConsistentObjectKeys.md): Enforce JSON keys with consistent Unicode representation.
- [biome/useDeprecatedReason](https://lintradar.dev/rules/biome/useDeprecatedReason.md): Require a reason when using the `@deprecated` directive.
- [biome/useBiomeTopLevelTypes](https://lintradar.dev/rules/biome/useBiomeTopLevelTypes.md): Require kind sets in Biome JS plugins to be created at the top level of the module.
- [biome/useGenericFontNames](https://lintradar.dev/rules/biome/useGenericFontNames.md): Require a generic fallback in font-family lists.

---

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