Replacing ESLint and Prettier with Biome for Faster Tooling
Learn how to consolidate your JavaScript/TypeScript tooling by replacing ESLint and Prettier with Biome for faster linting and formatting in a single binary.
06 Jul 2025, 06:31 UTC

The Tooling Overhead Problem
Modern JavaScript and TypeScript projects often rely on a combination of ESLint for logical errors and Prettier for stylistic consistency. This setup requires managing two separate configuration files, multiple plugin dependencies, and two distinct execution cycles in CI/CD pipelines. As projects grow, the Node.js-based execution of these tools can become a bottleneck, slowing down commit hooks and build times.
The takeaway: Biome consolidates linting and formatting into a single Rust-based binary, eliminating the need for separate ESLint and Prettier installations while significantly reducing execution time.
Prerequisites
- A JavaScript or TypeScript project using Node.js.
- A package manager (npm, yarn, or pnpm) installed.
- Existing
.eslintrcor.prettierrcfiles (optional, but useful for comparison).
Migration and Implementation
1. Installation
Install Biome as a development dependency. Run this command in your project root using your preferred package manager:
npm install --save-dev --save-exact @biomejs/biome
2. Initializing Configuration
Initialize the biome.json file, which serves as the centralized configuration for both the linter and the formatter.
npx biome init
3. Configuring Rules and Overrides
Open biome.json to define your project's standards. Unlike ESLint, which requires separate plugins for different environments, Biome includes many common rules out of the box. Use the overrides array to apply different rules to specific directories, such as ignoring test files for certain complexity checks.
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noExcessiveCognitiveComplexity": "warn"
}
}
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"overrides": [
{
"include": ["tests/**"],
"linter": {
"rules": {
"complexity": {
"noExcessiveCognitiveComplexity": "off"
}
}
}
}
]
}
4. Executing the Toolchain
Biome uses the check command to perform linting, formatting, and import organization in a single pass. Run this from your terminal with standard user permissions:
To identify issues:
npx biome check .
To automatically fix safe issues (formatting and simple lint fixes):
npx biome check --apply .
To apply unsafe fixes (refactors that may change logic):
npx biome check --apply-unsafe .
Comparison: Biome vs. Traditional Stack
| Feature | ESLint + Prettier | Biome |
|---|---|---|
| Runtime | Node.js | Rust |
| Config Files | Multiple (.eslintrc, .prettierrc) | Single (biome.json) |
| Execution Pass | Two separate passes | Unified pass |
| Plugin Ecosystem | Extensive/Customizable | Built-in/Opinionated |
Verification and Validation
To ensure the migration is successful and consistent, perform the following checks:
- Diff Analysis: Run
npx biome check --apply .and review the git diff. If the changes are purely stylistic and align with your previous Prettier settings, the formatter is configured correctly. - CI Integration: Add
npx biome ci .to your pipeline. This command is optimized for CI environments and will exit with a non-zero code if any issues are found, ensuring code quality gates are enforced. - Import Check: Verify that
organizeImportsis functioning by intentionally misordering imports in a file and running the check command.
Limitations and Risks
- Plugin Gap: Biome does not support custom ESLint plugins. If your project relies on highly specific AST transformations (e.g., specialized framework plugins), you may need to keep ESLint for those specific rules.
- Initial Diff Noise: Because Biome's formatting engine differs slightly from Prettier, the first run may produce a massive commit. It is recommended to perform this update in a dedicated "tooling migration" PR.
- Syntax Lag: Support for experimental TC39 proposals may arrive later in Biome than in specialized Node-based tools.
Rollback Procedure
If Biome does not meet your project's specific linting requirements, revert the changes by following these steps:
- Remove the Biome dependency:
npm uninstall @biomejs/biome. - Delete the
biome.jsonconfiguration file. - Re-install your previous ESLint and Prettier packages and restore their respective configuration files from version control.
- Run
npm run lint(or your previous lint command) to verify the original environment is restored.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.