# noConvexOldRegisteredFunctionSyntax

Rule `biome/noConvexOldRegisteredFunctionSyntax`. Require the object syntax when registering 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: #494 by reach, #129 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `nursery/noConvexOldRegisteredFunctionSyntax` | yes | unsafe | group nursery, since 2.6.10 | [docs](https://biomejs.dev/linter/rules/no-convex-old-registered-function-syntax/) |

## Code examples

### Incorrect: the rule reports this

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

```js
export const send = mutation(async (ctx, { body }) => {
    await ctx.db.insert("messages", { body });
});
```

### Correct: the rule accepts this

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

export const send = mutation({
    args: { body: v.string() },
    handler: async (ctx, { body }) => {
        await ctx.db.insert("messages", { body });
    },
});
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noConvexOldRegisteredFunctionSyntax": "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/noConvexDuplicateIndexes](https://lintradar.dev/rules/biome/noConvexDuplicateIndexes.md): Disallow Convex database indexes whose fields are the first fields of another index on the same table.
- [biome/noConvexProcessEnv](https://lintradar.dev/rules/biome/noConvexProcessEnv.md): Disallow `process.env` in Convex functions.
- [biome/noConstEnum](https://lintradar.dev/rules/biome/noConstEnum.md): Disallow TypeScript `const enum`
- [biome/noConvexQueryFilter](https://lintradar.dev/rules/biome/noConvexQueryFilter.md): Disallow calling `.filter()` on a Convex database query.
- [biome/noBiomeFirstException](https://lintradar.dev/rules/biome/noBiomeFirstException.md): Disallow ineffective ordering in `files.includes` patterns.
- [biome/noConvexTimeOrRandomInQueries](https://lintradar.dev/rules/biome/noConvexTimeOrRandomInQueries.md): Disallow reading the current time or generating random values in Convex queries.

---

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