Bỏ qua để vào nội dung chính
Biome vs ESLint: Should You Switch Your Linter in 2026?

Biome vs ESLint: Should You Switch Your Linter in 2026?

Bởi Isabella Chen
28 thg 3, 20266 phút đọc

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.

Frequently Asked Questions

Can Biome and ESLint run side-by-side during migration?

Yes — most teams scope Biome to formatting and basic linting while keeping ESLint for rules Biome doesn't cover yet (a11y plugins, custom rules). Disable overlapping rules in ESLint to avoid double-fix conflicts.

Does Biome support TypeScript fully in 2026?

Biome handles TypeScript parsing and most type-aware rules without needing a separate tsc invocation for linting. However, type-checking itself still requires tsc — Biome doesn't replace the TypeScript compiler.

Is Biome production-ready in 2026?

Yes — Biome 1.x is used in production at Astro, Tabnine, Shopify, and many others. The rule set covers ~80% of common ESLint configurations, with active community work filling the remaining gaps.

What ESLint rules does Biome NOT cover?

Notable gaps as of 2026: eslint-plugin-jsx-a11y, custom plugins requiring AST walks, some import/order edge cases, and project-specific rules built on TypeScript's type information. Keep ESLint for those if you depend on them.

Không spam, hủy đăng ký bất kỳ lúc nào.

Bài viết liên quan