惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
博客园 - 【当耐特】
大猫的无限游戏
大猫的无限游戏
IT之家
IT之家
宝玉的分享
宝玉的分享
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
爱范儿
爱范儿
小众软件
小众软件
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
S
SegmentFault 最新的问题
博客园 - Franky
博客园_首页
T
Tailwind CSS Blog
雷峰网
雷峰网
罗磊的独立博客

皓子的小站

网站字体应用之坑——font-family 篇 糟糕的 meta name="theme-color" How to Automatically Track Newly Supported ESLint Rules in Oxlint 静态资源预压缩:零运行时开销,极致节省带宽 CVE-2025-70886 Proof of Concept (PoC) | A Script to Crash Halo CMS Comment Backend 自定义网页鼠标指针——一段曲折的旅程 CVE-2025-70886 漏洞复现/PoC | 一个脚本让 Halo CMS 评论后台瘫痪 2025 年终总结 & 博客两周年 老用户专享!已有 Halo 专业版授权可免费升级商业版 自动追踪 Oxlint 对 ESLint 规则的新增支持 Halo 贡献者证书与实体周边盲盒开箱 博客评论系统指南 CDN 回源跟随配置导致登录异常问题排查 SCDN 免费赞助计划:助力高质量博客&博客圈 锐捷校园网:网络共享与带宽叠加方案(哈理工案例) ESLint 到 Oxlint 渐进式迁移快速上手指南 Fixing Vite Breaking Inline JS & CSS in Thymeleaf Templates 解决 Vite 破坏 Thymeleaf 模板内联 JS & CSS 的方法 我的博客,为什么是月更? 博客俱乐部一周年纪念品开箱 网站字体加载之坑——format 篇 经历 1000000000 次 DDoS 请求攻击后,我总结了三条经验 题解分享:[AtCoder Beginner Contest 414 E] Count A%B=C 题解分享:[蓝桥杯 2025 国 Python A] 杨辉三角 P12876 FiF口语训练破解刷分教程(适用于 Windows) 不要与蠢人辩论 小心网络地雷·续篇 当心网络组织“开往”·续篇 当心网络组织“开往” 小心网络地雷
How to Gradually Migrate from ESLint to Oxlint (Without B...
HowieHz · 2026-03-09 · via 皓子的小站

简体中文 | English

Intro

Last year (August 22, 2025), Oxlint shipped a new release with type-aware linting support, along with a handy migration tool that can automatically convert your ESLint config to Oxlint.

If you've been dealing with ESLint's sluggish performance and cryptic error messages, now is a great time to make the switch to Oxlint.

This guide will walk you through migrating from ESLint to Oxlint step by step. You can either drop ESLint entirely or run both side by side — the latter being the officially recommended approach for incremental migration.

What is type-aware linting? When type-aware mode is enabled, Oxlint analyzes your code using TypeScript's type information rather than relying solely on static JavaScript syntax rules.

Why Oxlint Is Worth the Switch

  • Blazing fast performance — Oxlint is written in Rust.
    • In my own benchmarks, linting my theme repo took ESLint 2.5 seconds, while Oxlint finished in just 33ms (without type-aware) or 475ms (with type-aware).
  • Way better diagnostics — Unlike ESLint, which only points you to the offending line and the triggered rule, Oxlint gives you a detailed breakdown of what went wrong, where exactly it happened (with color-coded highlights), and how to fix it.

Migration Steps

First, make sure your ESLint setup is already using the Flat Config format (typically eslint.config.js). If you're still on .eslintrc.js or .eslintrc.json, check out this config migration guide to upgrade first.

Install Dependencies

Add oxlint and oxlint-tsgolint (required for type-aware rule support) to your project:

pnpm add -D oxlint@latest oxlint-tsgolint@latest
If you don't need type-aware rule support
pnpm add -D oxlint@latest
Using a package manager other than pnpm?
npm
npm install -D oxlint@latest oxlint-tsgolint@latest

Without type-aware support:

npm install -D oxlint@latest
yarn
yarn add -D oxlint@latest oxlint-tsgolint@latest

Without type-aware support:

yarn add -D oxlint@latest
bun
bun add -D oxlint@latest oxlint-tsgolint@latest

Without type-aware support:

bun add -D oxlint@latest

Note: Since Oxlint is a native Rust binary, it doesn't depend on Node.js at all. You can grab a prebuilt binary directly from the releases page, or just run it on the fly:

pnpm dlx oxlint@latest
Using a package manager other than pnpm?
npm
npx oxlint@latest
yarn
yarn dlx oxlint@latest
bun
bunx oxlint@latest
deno
deno run npm:oxlint@latest

Auto-Migrate Your ESLint Config

The Oxlint team provides an official migration tool that converts your ESLint Flat Config into an Oxlint config.

Run:

pnpm dlx @oxlint/migrate --type-aware

Flag breakdown:

  • --type-aware — enables TypeScript type-aware linting

For all available options, refer to the official README.

If you don't need type-aware rule support
pnpm dlx @oxlint/migrate
Using a package manager other than pnpm?
npm
npx @oxlint/migrate --type-aware

Without type-aware support:

npx @oxlint/migrate
yarn
yarn dlx @oxlint/migrate --type-aware

Without type-aware support:

yarn dlx @oxlint/migrate
bun
bunx @oxlint/migrate
deno
deno run npm:@oxlint/migrate

Once the tool runs, it'll generate an .oxlint.json config file in your project root and map as many ESLint rules to their Oxlint equivalents as possible.

If you don't see any unsupported rule warnings during migration, that means all your ESLint rules are covered — and you're pretty much clear to remove ESLint entirely.

If you see unsupported rule, but in development, you can try enabling the Nursery ruleset (rules that are actively being developed). Just append --with-nursery to your migration command:

pnpm dlx @oxlint/migrate --type-aware --with-nursery

Advanced: Auto-Track Newly Supported Rules

Auto-track Oxlint's growing support for ESLint rules

Remove ESLint (Optional)

If the previous step produced no unsupported rule warnings — meaning Oxlint fully covers your ESLint ruleset — you can go ahead and remove ESLint:

# Uninstall ESLint and related packages
pnpm remove eslint @eslint/js typescript-eslint
# Remove any ESLint plugins you had installed
pnpm remove eslint-plugin-xxx eslint-config-xxx ...

Then delete eslint.config.js and any remaining .eslintrc.* files.

Update Your package.json Scripts

Full Migration to Oxlint

Refer to the Oxlint CLI docs to replace your ESLint commands with Oxlint equivalents. For example:

{
  "scripts": {
    "lint": "eslint --fix ./src"
  }
}

becomes:

{
  "scripts": {
    "lint": "oxlint --type-aware --fix ./src"
  }
}

Update your lint-staged config as well:

{
  "lint-staged": {
    "**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue,astro,svelte}": "oxlint"
  }
}

Running Oxlint Alongside ESLint (Incremental Migration)

If you'd rather not migrate everything at once, you can run both linters together:

{
  "scripts": {
    "lint": "oxlint --type-aware --fix ./src && eslint --fix ./src"
  }
}

This way, Oxlint handles the bulk of your rules with fast feedback and detailed diagnostics, while ESLint picks up whatever Oxlint doesn't support yet.

Next, install eslint-plugin-oxlint to disable rules in ESLint that Oxlint already covers — no point running the same checks twice:

pnpm add -D eslint-plugin-oxlint@latest
Using a package manager other than pnpm?
npm
npm install -D eslint-plugin-oxlint@latest
yarn
yarn add -D eslint-plugin-oxlint@latest
bun
bun add -D eslint-plugin-oxlint@latest

Then wire it up in eslint.config.js:

import oxlint from 'eslint-plugin-oxlint';

export default [
  // ... your other plugins
  ...oxlint.buildFromOxlintConfigFile('./.oxlintrc.json'), // oxlint should be the last plugin
];

Miscellaneous

If you're using inline comments to suppress specific lint warnings, Oxlint supports that too. Check the docs for details on how to configure inline rule suppression.

Wrapping Up

Drop a comment below if you have any questions or run into issues. Happy linting! 🚀