Skip to content

OxLint Integration

OxLint is a Rust-based linter that's 50-100x faster than ESLint. It already covers many core ESLint, TypeScript, unicorn, import, and JSX-A11y rules natively.

With oxlint: true, this config automatically disables every ESLint rule that OxLint handles (via eslint-plugin-oxlint). No manual config, no rule conflicts, no guesswork about which linter covers what.

Everything OxLint doesn't support — type-aware TypeScript checks, SonarJS analysis, cspell, Storybook, Testing Library — keeps running through ESLint. You get the full rule set at the same severity, just split across two linters for maximum speed.

React rules in Rust

When react: true is enabled alongside OxLint, 31 React rules automatically run in Rust instead of JavaScript. This works because the React Compat Plugin registers @eslint-react rule implementations under their classic eslint-plugin-react names — the exact names OxLint expects. Rules like react/jsx-key, react/no-danger, and react/no-children-prop are handled natively by OxLint while ESLint covers the rules OxLint can't handle yet (Web API leak detection, React 19 migration, type-aware analysis).

As OxLint expands its React coverage, more rules shift to Rust automatically — no config changes required.

Setup

  1. Install oxlint as a dev dependency:

    npm install -D oxlint
  2. Enable it in your ESLint config:

    // eslint.config.ts
    import { getEslintConfig } from "eslint-config-setup"
    
    export default await getEslintConfig({ react: true, ai: true, oxlint: true })
  3. Generate a matching OxLint config:

    // oxlint.config.ts
    import { defineConfig } from "oxlint"
    import { getOxlintConfig } from "eslint-config-setup"
    
    export default defineConfig(getOxlintConfig({ react: true, ai: true }))
  4. Run both linters in sequence — OxLint first for instant feedback, ESLint second for deep analysis:

    // package.json
    {
      "scripts": {
        "lint": "oxlint && eslint"
      }
    }

TIP

getOxlintConfig() loads a pre-generated OxLint config that mirrors your ESLint rules — same rules, same severity, zero runtime overhead.