Biome vs ESLint: Should You Switch Your Linter in 2026?
Biome is 10-50x faster than ESLint and handles both linting and formatting. Learn how it compares, what you give up, and whether migrating makes sense for your project.
What Is Biome?
Biome is a Rust-based JavaScript/TypeScript toolchain that combines linting, formatting (replacing Prettier), and import organizing into a single fast tool. It's not a drop-in ESLint replacement — it has its own rule set — but for many projects it's a compelling alternative.
Speed Comparison
On a real-world Next.js project with ~400 files:
- ESLint + Prettier: ~12 seconds full run
- Biome: ~0.3 seconds full run
This is a 40x difference that meaningfully improves DX, CI times, and git hook speed.
Setting Up Biome
npm install --save-dev --save-exact @biomejs/biome
npx @biomejs/biome init
// biome.json
{
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnusedVariables": "error",
"noUnusedImports": "error"
},
"style": {
"noNonNullAssertion": "warn",
"useConst": "error"
},
"suspicious": {
"noConsoleLog": "warn"
}
}
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "always",
"trailingCommas": "es5"
}
}
}
Running Biome
// package.json scripts
{
"scripts": {
"lint": "biome lint ./src",
"format": "biome format --write ./src",
"check": "biome check --write ./src",
"ci": "biome ci ./src"
}
}
What Biome Lacks vs ESLint
Biome's rule coverage is good but not complete:
- No plugin ecosystem (no eslint-plugin-react-hooks, no custom rules)
- No TypeScript type-aware rules (like
@typescript-eslint/no-floating-promises) - Fewer framework-specific rules
For teams using heavy ESLint plugins (accessibility, React hooks, specific frameworks), ESLint may still be the right choice — or a hybrid approach.
The Hybrid Approach
// Use Biome for formatting + basic linting
// Keep ESLint only for type-aware and plugin-specific rules
// .eslintrc.json — minimal ESLint config
{
"extends": [
"plugin:@typescript-eslint/recommended-type-checked",
"plugin:react-hooks/recommended"
],
"parserOptions": {
"project": true
},
"rules": {
// Only rules Biome can't handle
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/await-thenable": "error"
}
}
Migration Path
For greenfield projects: start with Biome. For existing projects with complex ESLint configs: run both in parallel for a sprint, audit which ESLint rules Biome doesn't cover, then decide if the remaining rules justify keeping ESLint. For many teams, the answer is yes to Biome + a minimal ESLint for type-aware rules.
Verdict
Biome is ready for production in 2026. If your ESLint config is mostly the recommended rules plus Prettier, switching gives you 40x faster tooling for free. If you rely heavily on TypeScript type-aware rules or framework plugins, a hybrid approach or staying on ESLint is pragmatic.
Admin
Bình luận (0)
Đăng nhập để bình luận
Chưa có bình luận nào. Hãy là người đầu tiên!