This skill guides you through migrating a JavaScript/TypeScript project from ESLint to
Oxlint.
Overview
Oxlint is a high-performance linter that implements many popular ESLint rules natively in Rust. It can be used alongside ESLint or as a full replacement.
An official migration tool is available:
Step 1: Run Automated Migration
Run the migration tool in the project root:
This reads your ESLint flat config and generates a
file.
Key Options
| Option | Description |
|---|
| Merge with an existing instead of overwriting |
| Include type-aware rules (requires running oxlint with ) |
| Include experimental rules still under development |
| Enable/disable ESLint plugin migration via (default: enabled) |
| List rules that could not be migrated |
--replace-eslint-comments
| Convert comments to |
| Specify output path (default: ) |
If your ESLint config is not at the default location, pass the path explicitly:
bash
npx @oxlint/migrate ./path/to/eslint.config.js
Step 2: Review Generated Config
After migration, review the generated
.
Plugin Mapping
The migration tool automatically maps ESLint plugins to oxlint's built-in equivalents. The following table is for reference when reviewing the generated config:
| ESLint Plugin | Oxlint Plugin Name |
|---|
@typescript-eslint/eslint-plugin
| |
/ eslint-plugin-react-hooks
| |
| / | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Default plugins (enabled when
field is omitted):
,
,
.
Setting the
array explicitly overrides these defaults.
Rule Categories
Oxlint groups rules into categories for bulk configuration:
json
{
"categories": {
"correctness": "warn",
"suspicious": "warn"
}
}
Available categories:
(default: enabled),
,
,
,
,
,
.
Individual rule settings in
override category settings.
Check Unmigrated Rules
Run with
to see which ESLint rules could not be migrated:
bash
npx @oxlint/migrate --details
Review the output and decide whether to keep ESLint for those rules or find oxlint alternatives.
Step 3: Handle Unsupported Features
Some features require manual attention:
- Local plugins (relative path imports): Must be migrated manually to
- : Not supported. Use oxfmt instead
- in override configs: Oxlint does not support inside blocks
- ESLint v9+ plugins: Not all work with oxlint's JS Plugins API. Test with
External ESLint Plugins
For ESLint plugins without a built-in oxlint equivalent, use the
field to load them:
json
{
"jsPlugins": ["eslint-plugin-custom"],
"rules": {
"custom/my-rule": "warn"
}
}
Step 4: Update CI and Scripts
Replace ESLint commands with oxlint. Path arguments are optional; oxlint defaults to the current working directory.
bash
# Before
npx eslint src/
npx eslint --fix src/
# After
npx oxlint@latest
npx oxlint@latest --fix
Common CLI Options
| ESLint | oxlint |
|---|
| (default: cwd) |
| |
| |
| or |
| |
| oxlint --config config.json
|
Additional oxlint options:
- : Enable rules requiring TypeScript type information
- : Specify tsconfig.json path for type-aware linting
Tips
- Start gradually: Enable rules first (the default), then progressively add , , etc.
- Run alongside ESLint: Oxlint is designed to complement ESLint during migration. You can run both until all rules are covered.
- Disable comments work: and
// eslint-disable-next-line
comments are supported by oxlint. Use --replace-eslint-comments
to convert them to if desired.
- List available rules: Run
npx oxlint@latest --rules
to see all supported rules.
- Schema support: Add
"$schema": "./node_modules/oxlint/configuration_schema.json"
to for editor autocompletion.
- Output formats: , , , , , , ,
References