The Problem: ESLint and Prettier Fatigue
Every time I spin up a new TypeScript repository, I end up installing a dozen packages just to check my code: eslint, prettier, @typescript-eslint/parser, @typescript-eslint/eslint-plugin, eslint-config-prettier, not to mention plugins for imports or React. That stack alone pulls hundreds of sub-dependencies into node_modules. Worse still, whenever Node.js or ESLint rolls out a major upgrade (like the shift to Flat Config), config files break and rule conflicts pop up everywhere.
Speed also becomes a nightmare once a codebase grows to around 50,000 lines. The lint step in Git hooks or CI pipelines can easily eat up anywhere from 30 seconds to over 2 minutes. Sitting around waiting for pre-commit checks to finish is exhausting. Naturally, developers start reaching for --no-verify to save time, accidentally pushing broken code straight to the main branch.
I once refactored a 50K-line codebase and learned a hard-earned lesson: you need solid test coverage before you start cleaning things up. Back then, my team decided to tear out our bloated legacy linting and formatting setup. Having a suite of unit and integration tests as a safety net gave me the confidence to run auto-fixes across more than 400 TypeScript files without worrying about breaking subtle logic. That project was also when I switched to Biome for good.
What Is Biome and Why Is It So Fast?
Biome (formerly known as Rome) is an all-in-one toolchain for the web ecosystem, supporting JavaScript, TypeScript, JSON, and CSS. It is written entirely in Rust. Instead of running ESLint to catch errors alongside Prettier to format code, Biome combines both into a single executable.
In practice, on the same 1,000-file TypeScript repo, Biome takes only about 200–300 milliseconds to check everything, whereas ESLint paired with Prettier typically takes 10–15 seconds. This 10x to 30x speed difference comes down to four core design choices:
- Single Parse (Unified AST): Because ESLint and Prettier run separately, each tool has to read every file and build an Abstract Syntax Tree (AST) from scratch. Biome parses each file once and reuses that same AST for formatting, linting, and
importsorting. - Native Multithreading: Being written in Rust lets Biome fully leverage all CPU cores to process thousands of files in parallel, breaking free from Node.js’s single-threaded bottleneck.
- Zero Dependency Bloat: Installing Biome adds just a single binary, keeping
node_moduleslean. - Consolidated Configuration: Your team’s entire ruleset lives in a single
biome.jsonfile, completely replacing.eslintrc.json,.prettierrc,.eslintignore, and.prettierignore.
Hands-On: Migrating from ESLint & Prettier to Biome
Migrating a TypeScript project in practice usually comes down to these five steps.
Step 1: Remove ESLint and Prettier, then Install Biome
First, clear out the old packages and config files to prevent any conflicts:
npm uninstall eslint prettier eslint-config-prettier eslint-plugin-prettier @typescript-eslint/parser @typescript-eslint/eslint-plugin
rm -f .eslintrc* .prettierrc* .eslintignore .prettierignore
Next, install Biome in your devDependencies. It is good practice to include the --save-exact (or -E) flag to pin the version so everyone on the team gets identical formatting results:
npm install --save-dev --save-exact @biomejs/biome
Step 2: Initialize and Configure biome.json
Run the following command to generate a default configuration file:
npx @biomejs/biome init
If your existing repo has a lot of custom rules, don’t translate them by hand. Biome includes built-in migration commands to convert your ESLint and Prettier configs into biome.json: npx @biomejs/biome migrate eslint --write and npx @biomejs/biome migrate prettier --write.
A clean biome.json for a standard TypeScript project typically looks like this:
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"ignore": ["dist", "build", "coverage", "node_modules"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnusedVariables": "error",
"noUnusedImports": "error"
},
"style": {
"useImportType": "error"
}
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "always"
}
}
}
Enabling useIgnoreFile: true under vcs is a handy trick. Biome will automatically read your existing .gitignore, so you no longer need to maintain a separate ignore file.
Step 3: Run Checks and Auto-Fixes Across the Codebase
Biome’s check command handles all three tasks at once: formatting code, organizing imports, and linting. To scan the entire project in read-only mode, run:
npx @biomejs/biome check .
Add the --write flag if you want Biome to automatically apply safe fixes:
npx @biomejs/biome check --write .
For fixes that may slightly alter code structure—such as removing unused variables (noUnusedVariables) or switching to import type—you need to pass the --unsafe flag. Use this option carefully, though. Only run --unsafe in bulk if your project has strong test coverage or you are prepared to review the git diff thoroughly.
Step 4: Set Up Git Hooks with Lefthook
To catch bad code right on the developer’s machine, hook checks into the pre-commit stage. Instead of pairing Husky with lint-staged, you can pair Biome with Lefthook (written in Go, making it lightweight and great at running tasks in parallel).
npm install --save-dev lefthook
npx lefthook install
Create a lefthook.yml file in the root directory of your project:
pre-commit:
commands:
biome-check:
glob: "*.{js,ts,jsx,tsx,json,css}"
run: npx @biomejs/biome check --write --no-errors-on-unmatched --files-ignore-unknown=true {staged_files}
stage_fixed: true
Here is what the options in that config do:
--no-errors-on-unmatched: Prevents a non-zero exit (exit code 1) if a commit only touches files like Markdown or YAML that Biome doesn’t support yet.--files-ignore-unknown=true: Automatically skips unrecognized file formats instead of failing the hook.stage_fixed: true: Automatically runsgit addon files modified by Biome before the commit completes.
If your team is already used to Husky, just add the following line to .husky/pre-commit (using the --staged flag instead of {staged_files}):
npx @biomejs/biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --staged && git update-index --again
With roughly 10–20 staged files per commit, this hook usually finishes in under 100 milliseconds. Running git commit feels nearly instantaneous.
Step 5: Add Scripts to package.json and Configure Your Editor
Finally, standardize commands for both your team and CI by updating the scripts section in package.json:
"scripts": {
"lint": "biome lint .",
"format": "biome format --write .",
"check": "biome check --write .",
"ci:check": "biome ci ."
}
The biome ci . command is built specifically for pipelines: it checks formatting, linting, and import sorting in read-only mode and reports clear errors if anything falls short. On your local machine, simply install the Biome extension for your editor and set it as your Default Formatter.
Conclusion
Switching from ESLint and Prettier to Biome cuts out configuration bloat and eliminates rule conflicts altogether. Code check times drop down to milliseconds. If you are about to start a new TypeScript project or want to speed up your team’s workflow, Biome is well worth a try.
Of course, no tool is a silver bullet for every scenario. If your project relies on specialized ESLint plugins that Biome doesn’t support yet, you can start by using Biome just for formatting. Keep ESLint around for those specific lint rules, and migrate the rest over to Biome later on.

