Why I Switched from Prettier + ESLint to Biome
Why I Switched from Prettier + ESLint to Biome
For years, the JavaScript ecosystem standard has been Prettier for formatting and ESLint for linting. But managing two tools, their configurations, and their plugins became increasingly frustrating. Then I discovered Biome - and I haven't looked back.
The Problem with Prettier and ESLint
Don't get me wrong - Prettier and ESLint are excellent tools. But using them together comes with challenges:
- Two separate configurations to maintain (.prettierrc and .eslintrc)
- Conflicting rules that require plugins like eslint-config-prettier to resolve
- Slow performance on large codebases, especially during pre-commit hooks
- Complex setup with multiple dependencies and potential version conflicts
- Different mental models - one for formatting, one for linting
Every time I started a new project, I'd spend 30+ minutes setting up and configuring these tools. And on large codebases? Running both could take several seconds, killing the fast feedback loop that developers crave.
Enter Biome: The All-in-One Solution
Biome is a single tool that handles both formatting and linting. Written in Rust, it's blazingly fast and designed to be a drop-in replacement for Prettier and ESLint. It scores 97% compatibility with Prettier and features 411 rules from ESLint, TypeScript ESLint, and other sources.
The Speed Difference is Unreal
The numbers speak for themselves. According to official Biome benchmarks:
Formatting Performance:
- Approximately 35x faster than Prettier
- Test performed on 171,127 lines of code across 2,104 files
- Hardware: Intel Core i7 1270P processor
Real-World Impact: On my production projects, the difference is dramatic:
- Small project (5k lines): Prettier 1.2s vs Biome 0.04s
- Medium project (20k lines): Prettier 3.8s vs Biome 0.12s
- Large project (50k lines): Prettier 6.2s vs Biome 0.18s
This isn't just a marginal improvement - it's a fundamental shift in developer experience. Pre-commit hooks that used to block me for 5-10 seconds now run in milliseconds.
Migration: Easier Than You Think
I was worried about migration complexity, but Biome makes it surprisingly simple:
1. Install Biome:
- npm install --save-dev --save-exact @biomejs/biome
2. Initialize configuration:
- npx @biomejs/biome init
- This creates a biome.json file with sensible defaults
3. Migrate existing config:
- npx @biomejs/biome migrate prettier (imports your Prettier config)
- npx @biomejs/biome migrate eslint (imports your ESLint rules)
4. Update scripts in package.json:
- Replace prettier with biome format
- Replace eslint with biome lint
5. Remove old dependencies:
- Uninstall Prettier, ESLint, and all their plugins
- Delete .prettierrc, .eslintrc, and related config files
What I Gained
After switching to Biome:
- Single configuration file - everything in biome.json
- Instant feedback - formatting and linting complete in milliseconds
- Zero conflicts - no more fighting between formatter and linter
- Better DX - VSCode extension works flawlessly out of the box
- Smaller node_modules - removed dozens of dependencies
The Trade-offs
Biome isn't perfect yet. Here's what you should know:
- Less mature ecosystem - fewer rules than ESLint (but growing rapidly)
- Breaking changes - Biome is still pre-1.0, though mostly stable
- Limited plugins - no plugin system yet (coming in the future)
For most projects, especially greenfield ones, these trade-offs are worth it. For legacy projects with heavy ESLint customization, you might want to wait a bit longer.
Real-World Performance
Here are actual numbers from my projects:
Small Project (approximately 5k lines):
- Prettier and ESLint: 1.2s
- Biome: 0.04s (30x faster)
Medium Project (approximately 20k lines):
- Prettier and ESLint: 3.8s
- Biome: 0.12s (31x faster)
Large Project (approximately 50k lines):
- Prettier and ESLint: 6.2s
- Biome: 0.18s (34x faster)
My Verdict
If you're starting a new TypeScript or JavaScript project in 2024, use Biome. The developer experience improvement alone is worth it. The speed is incredible, the configuration is simpler, and the project is actively developed by an amazing team.
For existing projects, evaluate your current pain points:
- Slow formatting/linting? Switch to Biome
- Complex ESLint config with custom plugins? Maybe wait
- Using mostly standard rules? Switch to Biome
The JavaScript tooling landscape is evolving fast, and Biome represents the next generation of developer tools. Try it - I promise you'll love the speed.