Skip to content
Ultracite
Esc
navigateopen⌘Jpreview
On this page

Oxlint

Explore Ultracite's Oxlint and Oxfmt setup for teams that prioritize lint speed, shared presets, and lightweight editor defaults.

Oxlint is part of the Oxc project, a collection of high-performance JavaScript tools written in Rust. Paired with Oxfmt for formatting, this toolchain is ideal for large codebases where speed is critical.

Benefits

  • 50-100x faster — Lint your entire codebase in milliseconds
  • 15 plugin equivalents — Built-in support for React, TypeScript, Next.js, Vue, Jest, Vitest, and more
  • Bug-focused rules — Prioritizes catching real bugs over stylistic issues
  • High signal-to-noise ratio — Fewer false positives, more actionable feedback
  • Oxc ecosystem — Part of a larger project with parser, resolver, transformer, and minifier
  • Drop-in ready — Works alongside existing setups or as a complete replacement

Usage

Ultracite generates two TypeScript config files for Oxlint:

import { defineConfig } from "oxlint";
import core from "ultracite/oxlint/core";

export default defineConfig({
  extends: [core],
  ignorePatterns: core.ignorePatterns,
});
import { defineConfig } from "oxfmt";
import ultracite from "ultracite/oxfmt";

export default defineConfig({
  ...ultracite,
});

Add framework presets as needed:

import { defineConfig } from "oxlint";
import core from "ultracite/oxlint/core";
import next from "ultracite/oxlint/next";
import react from "ultracite/oxlint/react";

export default defineConfig({
  extends: [core, react, next],
  ignorePatterns: core.ignorePatterns,
});

ESLint Parity (Optional)

The core preset — and the react, next, and tanstack framework presets — run entirely on Oxlint’s native, Rust-powered rules for maximum speed. If you want to close the remaining gap with the ESLint preset, Ultracite ships an opt-in js-plugins preset that runs eslint-plugin-github, eslint-plugin-sonarjs, and oxlint-plugin-react-doctor through Oxlint’s JS plugin support.

This is off by default because it adds dependencies and runs a slower JavaScript lint pass instead of the native Rust one. You can enable it during setup: interactive ultracite init lets you choose individual JS plugins when you choose Oxlint, and non-interactive setup accepts package names via --js-plugins.

npx ultracite init --linter oxlint --js-plugins eslint-plugin-github eslint-plugin-sonarjs oxlint-plugin-react-doctor
pnpm dlx ultracite init --linter oxlint --js-plugins eslint-plugin-github eslint-plugin-sonarjs oxlint-plugin-react-doctor
yarn dlx ultracite init --linter oxlint --js-plugins eslint-plugin-github eslint-plugin-sonarjs oxlint-plugin-react-doctor
bunx ultracite init --linter oxlint --js-plugins eslint-plugin-github eslint-plugin-sonarjs oxlint-plugin-react-doctor

Note: The React Doctor rules used to be bundled into the react, next, and tanstack presets. They now live in js-plugins so those framework presets stay on the fast native path. Extend js-plugins alongside your framework preset to keep them.

If you’re adding the preset manually instead of through init, install the plugins yourself:

npm install -D eslint-plugin-github eslint-plugin-sonarjs oxlint-plugin-react-doctor
pnpm add -D eslint-plugin-github eslint-plugin-sonarjs oxlint-plugin-react-doctor
yarn add -D eslint-plugin-github eslint-plugin-sonarjs oxlint-plugin-react-doctor
bun add -D eslint-plugin-github eslint-plugin-sonarjs oxlint-plugin-react-doctor
import { defineConfig } from "oxlint";
import core from "ultracite/oxlint/core";
import jsPlugins from "ultracite/oxlint/js-plugins";

export default defineConfig({
  extends: [core, jsPlugins],
  ignorePatterns: core.ignorePatterns,
});

Configuration Approach

Ultracite’s Oxlint configuration uses an opt-out approach. This means we explicitly enable rules from every category at the error level, then selectively disable rules that are too strict or don’t fit our opinionated defaults. This ensures maximum bug-catching coverage while avoiding noise.

Rule Categories

Oxlint organizes rules into the following categories:

Correctness

Rules that catch definite bugs and errors. These are high-confidence rules that identify code that is almost certainly wrong.

Suspicious

Rules that catch code patterns that are likely bugs or mistakes. These have a slightly higher false-positive rate but catch important issues.

Pedantic

Rules that enforce stricter coding standards. These are more opinionated and may require more effort to satisfy.

Performance

Rules that identify performance issues and suggest optimizations for better runtime efficiency.

Restriction

Rules that restrict certain language features or patterns. These are typically project-specific preferences.

Style

Rules that enforce consistent code style across the codebase.

Included Plugins

Oxlint includes built-in support equivalent to these ESLint plugins:

  • eslint — Core JavaScript rules
  • typescript — TypeScript-specific rules
  • unicorn — Opinionated code quality rules
  • oxc — Oxc-specific optimizations
  • import — Import/export validation
  • jsdoc — JSDoc comment validation
  • node — Node.js-specific rules
  • promise — Promise and async/await best practices
  • jest / vitest — Testing framework rules (enabled via the jest / vitest framework presets)

For extra ESLint parity, the optional js-plugins preset adds github (eslint-plugin-github), sonarjs (eslint-plugin-sonarjs), and react-doctor (oxlint-plugin-react-doctor) via Oxlint’s JS plugin support. See ESLint Parity — it is not enabled by default.

Adding Third-Party Plugins

Oxlint supports community plugins for additional rules beyond the built-in set. For example, Ultracite’s Biome preset includes cognitive complexity checking via noExcessiveCognitiveComplexity, but Oxlint only has the standard cyclomatic complexity rule built in. You can close this gap with a third-party plugin like oxlint-plugin-complexity:

npm install -D oxlint-plugin-complexity
pnpm add -D oxlint-plugin-complexity
yarn add -D oxlint-plugin-complexity
bun add -D oxlint-plugin-complexity
import { defineConfig } from "oxlint";
import core from "ultracite/oxlint/core";

export default defineConfig({
  extends: [core],
  ignorePatterns: core.ignorePatterns,
  jsPlugins: ["oxlint-plugin-complexity"],
  rules: {
    "complexity/complexity": ["error", { cognitive: 15 }],
  },
});

This approach lets you opt in to additional checks without Ultracite taking on third-party dependencies in its core preset.

Formatter Settings (Oxfmt)

Ultracite configures Oxfmt with these defaults:

  • Indentation: 2 spaces
  • Line Width: 80 characters
  • Semicolons: Always required
  • Double Quotes: Yes
  • Trailing Commas: ES5 style
  • Arrow Parentheses: Always include

Rule Reference

For the complete list of rules and their settings, see the Oxlint configuration on GitHub.

VS Code Extension

Install the Oxc extension for VS Code:

code --install-extension oxc.oxc-vscode

Was this page helpful?