Skip to main content

Oxlint

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.

Oxlint can load ESLint plugins as JS plugins, so it runs the same @convex-dev/eslint-plugin package as ESLint.

Setup​

Install the plugin with:

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

Then add this to your oxlint.config.ts file:

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

export default defineConfig({
jsPlugins: ["@convex-dev/eslint-plugin"],
ignorePatterns: ["convex/_generated"],
overrides: [
{
files: ["**/convex/**/*.ts"],
rules: convexPlugin.configs.recommended[0].rules,
},
],
});

To silence a rule on one line, use the same comments as in ESLint, for example // eslint-disable-next-line @convex-dev/no-filter-in-query.

Differences from ESLint​

Oxlint doesn’t give JS plugins TypeScript type information, so rules that use it fall back to matching code by name:

  • explicit-table-ids still reports ctx.db calls that are missing a table name, but can’t fill in the table name for you, and may miss calls made through a different variable.
  • no-collect-in-query and no-filter-in-query are a little less precise, and no-collect-in-query doesn’t suggest replacements.

Every other rule and autofix works the same as in ESLint. Oxlint’s --type-aware flag doesn’t change this, since it only applies to Oxlint’s built-in rules.

To add the missing table names in one go, run the codemod:

npx @convex-dev/codemod@latest explicit-ids