Skip to main content

Biome

For AI agents: see llms.txt for the complete documentation index. Markdown versions are available by adding .md to a page URL or requesting Accept: text/markdown.

Biome can’t load ESLint plugins (its own plugins are written in GritQL), so it can’t run the Convex rules by itself. Instead, keep using Biome for formatting and general linting, and run the Convex rules on your convex directory with Oxlint or ESLint.

With Oxlint​

Oxlint is fast like Biome, and supports every Convex rule.

npm i oxlint @convex-dev/eslint-plugin --save-dev

Turn off Oxlint’s default rules so it doesn’t repeat what Biome already checks:

// oxlint.config.ts
import { defineConfig } from "oxlint";
import convexPlugin from "@convex-dev/eslint-plugin";

export default defineConfig({
// Only run the Convex rules, Biome takes care of the rest
categories: { correctness: "off" },
jsPlugins: ["@convex-dev/eslint-plugin"],
ignorePatterns: ["convex/_generated"],
overrides: [
{
files: ["**/convex/**/*.ts"],
rules: convexPlugin.configs.recommended[0].rules,
},
],
});

This turns on the recommended rules. To turn on another rule as well, spread them into rules and add it:

rules: {
...convexPlugin.configs.recommended[0].rules,
"@convex-dev/no-collect-in-query": "error",
},

Then run both in your lint script:

// package.json
"scripts": {
"lint": "biome check . && oxlint convex"
}

A few rules work a bit differently without type information, see Differences from ESLint.

With ESLint​

If you want every autofix, run ESLint with only the Convex plugin, and only on your convex directory, so it stays quick. Install ESLint, typescript-eslint and the plugin:

npm i eslint typescript-eslint @convex-dev/eslint-plugin --save-dev

Use the eslint.config.js from Type-aware linting, then add ESLint to your lint script:

// package.json
"scripts": {
"lint": "biome check . && eslint convex"
}