Oxlint is a JavaScript and TypeScript linter written in Rust — it runs 50–100x faster than ESLint on large codebases by parsing in parallel with zero plugin overhead. npx oxlint@latest lints the current directory with 400+ built-in rules; no config required to start. oxlintrc.json enables or disables specific rules with the same rule names as ESLint plugins. eslint-plugin-oxlint disables ESLint rules that Oxlint already covers — run both in transition. --fix applies automatic fixes. Rule categories (correctness, suspicious, pedantic, style, restriction) control strictness levels. Oxlint integrates with lint-staged for fast pre-commit linting of changed files only. Claude Code generates Oxlint configurations, ESLint migration plans, CI linting steps, and the lint-staged setup for teams moving from ESLint to Oxlint.
CLAUDE.md for Oxlint
## Oxlint Stack
- Version: oxlint >= 0.15 (install via oxlint npm package or Cargo)
- CLI: npx oxlint [options] [paths] — no config needed to start
- Config: oxlintrc.json — { rules: {}, plugins: ["react","unicorn","typescript"], env: {} }
- Categories: --deny-warnings or per-rule "error"|"warn"|"off"
- Fix: npx oxlint --fix — modifies files in place
- ESLint compat: eslint-plugin-oxlint — disables overlapping ESLint rules
- Lint-staged: "*.{js,ts,tsx}": ["oxlint --fix"] — fast partial linting
- CI: oxlint --format github — annotates PRs in GitHub Actions
Quick Start
# Zero-config scan of current directory
npx oxlint@latest .
# Specific paths
npx oxlint src/ lib/
# Enable specific plugins
npx oxlint --react-plugins --typescript-plugins src/
# Fix auto-fixable issues
npx oxlint --fix src/
# Deny warnings as errors (strict CI mode)
npx oxlint --deny-warnings src/
Configuration
// oxlintrc.json — project configuration
{
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
"plugins": ["react", "unicorn", "typescript", "jsx-a11y"],
"env": {
"browser": true,
"node": true,
"es2024": true
},
"rules": {
// Correctness — catches bugs
"no-unused-vars": "error",
"no-undef": "error",
"no-unreachable": "error",
"no-constant-condition": "error",
// TypeScript-specific
"typescript/no-explicit-any": "warn",
"typescript/no-non-null-assertion": "warn",
"typescript/consistent-type-imports": ["error", { "prefer": "type-imports" }],
"typescript/no-unused-expressions": "error",
// React rules
"react/react-in-jsx-scope": "off", // Not needed in React 17+
"react/jsx-key": "error",
"react/no-array-index-key": "warn",
"react/hook-use-state": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
// Accessibility
"jsx-a11y/alt-text": "error",
"jsx-a11y/aria-role": "error",
"jsx-a11y/interactive-supports-focus": "warn",
// Code quality (unicorn rules)
"unicorn/no-process-exit": "error",
"unicorn/prefer-node-protocol": "error",
"unicorn/prefer-module": "warn",
"unicorn/filename-case": ["warn", { "case": "kebabCase" }],
// Style (disable in favor of Biome/Prettier for formatting)
"no-console": "warn"
},
"overrides": [
{
// Test files — relax some rules
"files": ["**/*.test.ts", "**/*.test.tsx", "**/*.spec.ts"],
"rules": {
"typescript/no-explicit-any": "off",
"no-console": "off"
}
},
{
// Config files
"files": ["*.config.ts", "*.config.js", "scripts/**"],
"env": { "node": true },
"rules": {
"no-console": "off",
"unicorn/prefer-module": "off"
}
}
]
}
ESLint Migration with eslint-plugin-oxlint
// eslint.config.js — transitional setup using both ESLint + Oxlint
import pluginOxlint from "eslint-plugin-oxlint"
import typescript from "@typescript-eslint/eslint-plugin"
import tsParser from "@typescript-eslint/parser"
export default [
{
files: ["**/*.{ts,tsx}"],
languageOptions: {
parser: tsParser,
parserOptions: { project: "./tsconfig.json" },
},
plugins: { "@typescript-eslint": typescript },
rules: {
// Only keep ESLint rules that Oxlint doesn't cover
// eslint-plugin-oxlint turns off the overlapping ones automatically
...typescript.configs["recommended-type-checked"].rules,
},
},
// Disable all ESLint rules that Oxlint already handles
// This prevents double-reporting and speeds up ESLint
pluginOxlint.buildFromOxlintConfigFile("./oxlintrc.json"),
]
# Run both tools during migration:
# 1. Oxlint for speed (runs first, covers 90% of rules)
# 2. ESLint for the remaining type-checked rules only
npx oxlint src/ && npx eslint src/
CI Integration
# .github/workflows/lint.yml
name: Lint
on: [push, pull_request]
jobs:
oxlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: "22" }
- name: Run Oxlint
run: npx oxlint@latest --format github --deny-warnings src/ lib/
# --format github: annotates PRs with inline comments on failures
lint-staged Configuration
// lint-staged.config.js — lint only changed files
export default {
// Oxlint for JS/TS — very fast even on large file sets
"*.{js,mjs,cjs,jsx,ts,tsx}": [
"oxlint --fix --deny-warnings",
"git add", // Stage auto-fixes
],
// Biome for formatting (separate from linting)
"*.{js,ts,tsx,json,css}": [
"biome check --write --no-errors-on-unmatched",
"git add",
],
}
// package.json scripts
{
"scripts": {
"lint": "oxlint src/",
"lint:fix": "oxlint --fix src/",
"lint:ci": "oxlint --format github --deny-warnings src/",
"prepare": "husky"
},
"devDependencies": {
"oxlint": "^0.15.0",
"eslint-plugin-oxlint": "^0.15.0",
"lint-staged": "^15.0.0",
"husky": "^9.0.0"
}
}
Pre-commit Hook
# .husky/pre-commit
#!/bin/sh
npx lint-staged
# Setup
npx husky init
echo "npx lint-staged" > .husky/pre-commit
Monorepo Setup
// packages/web/oxlintrc.json — package-level extending root
{
"extends": ["../../oxlintrc.json"],
"plugins": ["react", "jsx-a11y"],
"rules": {
"react/prop-types": "off", // Using TypeScript
"jsx-a11y/click-events-have-key-events": "warn"
}
}
// packages/api/oxlintrc.json — server has different rules
{
"extends": ["../../oxlintrc.json"],
"env": { "node": true, "browser": false },
"rules": {
"no-console": "off",
"unicorn/no-process-exit": "off"
}
}
For the Biome linter and formatter alternative that combines both linting and formatting in a single Rust-based tool with broader formatting support (replaces both ESLint and Prettier), see the Biome guide for configuration and migration from ESLint + Prettier. For ESLint when the broader plugin ecosystem (eslint-plugin-import, type-aware rules via @typescript-eslint, custom plugins) is required alongside existing tooling investment, the TypeScript configuration guides cover ESLint setup. The Claude Skills 360 bundle includes Oxlint skill sets covering configuration, CI integration, and ESLint migration. Start with the free tier to try Oxlint configuration generation.