eslint-config-biome

raw JSON →
2.1.3 verified Sat Apr 25 auth: no javascript

An ESLint shareable config that disables ESLint rules which have an equivalent and recommended rule in Biome, enabling simultaneous use of Biome and ESLint without conflicts. Current stable version: 2.1.3. Released on Biome version bumps; includes eslint-config-prettier to also disable formatting rules. Key differentiator: automates disabling overlapping rules, works with both flat config (ESLint v9+) and .eslintrc (v8).

error Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/eslint-config-biome/index.js not supported.
cause Using CommonJS require() on an ESM-only package (v1.8.3+).
fix
Switch to import syntax (ESM) or use dynamic import() if using CommonJS.
error Failed to load config "biome" to extend from.
cause Using flat config but incorrectly providing a string in extends or an object without the default import.
fix
Use import biome from 'eslint-config-biome' and add the biome object directly to the array.
error ESLint configuration error: The "extends" property is not supported in flat config.
cause Trying to use extends in flat config (ESLint v9).
fix
Use the array-based flat config: export default [ /* other configs */, biome ];
error Parsing error: The keyword 'import' is reserved
cause Using import in a CommonJS file without ESM configured.
fix
Add "type": "module" in package.json or use .mjs extension for the config file.
breaking Version 1.8.3+ requires ESLint v8.40+ for Flat Config support; older ESLint versions must use .eslintrc with overrides.
fix Upgrade ESLint to v8.40+ or use .eslintrc with overrides (not extends).
gotcha This config must be the last item in the flat config array or the last override in .eslintrc to effectively disable conflicting rules.
fix Ensure biome config is placed after all other configs (last in array or overrides list).
gotcha The package automatically includes eslint-config-prettier, so do not add it separately to avoid duplicates.
fix Remove eslint-config-prettier from your dependencies and ESLint config.
deprecated Using top-level extends with 'biome' in .eslintrc is deprecated; use overrides instead.
fix Move the biome config into the overrides array as shown in the quickstart.
gotcha ESLint v9 flat config expects a default import; require() will throw an error.
fix Use import biome from 'eslint-config-biome' instead of require.
npm install eslint-config-biome
yarn add eslint-config-biome
pnpm add eslint-config-biome

Demonstrates installation and configuration for both flat config and legacy .eslintrc, ensuring Biome and ESLint work together without conflicts.

// 1. Install
npm install -D eslint-config-biome

// 2. ESLint flat config (eslint.config.js)
import biome from 'eslint-config-biome';

export default [
  // other configs...
  biome, // must be last to override others
];

// 3. Alternatively, .eslintrc.json (ESLint v8 or flat config emulation)
{
  "overrides": [
    {
      "files": ["*.ts", "*.js", "*.tsx", "*.jsx"],
      "extends": ["biome"]
    }
  ]
}