Replace Prettier and ESLint with Biome in a TypeScript Project
Replace separate Prettier and ESLint configs with Biome's single formatter and linter, then verify rule coverage before enforcing it in CI.
11 Oct 2026, 13:42 UTC

The problem: two formatters, two linters, two CI failures
You push a feature branch and CI fails because Prettier wants different line widths. You fix that, push again, and ESLint flags an unused import. You fix that too, then your editor reformats the file on save and undoes the lint fix. Maintaining separate Prettier and ESLint configurations means maintaining two rule sets, two editor integrations, and two CI steps that can contradict each other.
Biome is a single Rust binary that combines formatting, linting, and import organization for JavaScript, TypeScript, JSX, TSX, and JSON. For many projects, it can replace both tools with one biome.json file and one biome check command. The trade-off is that Biome does not yet cover every ESLint plugin rule, so you should verify rule coverage before making it mandatory in CI.
Worked example: add Biome to a project
Open a terminal in your project root. No special permissions are required. First, confirm the installed CLI matches the version you intend to pin:
npx @biomejs/biome --version
Expected output is a version string such as v1.x.x. If the command cannot find the package, install it as a development dependency first.
Create a biome.json file in the project root. Point $schema to the JSON Schema published for your installed Biome version so editors can autocomplete the configuration:
{
"$schema": "https://biomejs.dev/schemas/schema.json",
"formatter": {
"enabled": true,
"formatWithErrors": false
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"organizeImports": {
"enabled": true
},
"files": {
"ignore": [
"node_modules",
"dist",
"build"
]
}
}
Run the formatter and linter together on a specific file:
npx @biomejs/biome check --write src/app.ts
This command mutates files. It can reformat code, sort imports, and apply lint fixes automatically. Review the changes before committing:
git diff src/app.ts
If the output includes changes you did not intend, restore the file with git checkout -- src/app.ts or revert the pull request.
To check every file without modifying anything, omit --write:
npx @biomejs/biome check
Enforce Biome in CI without breaking the build
Add npx @biomejs/biome check to your CI pipeline. Unlike --write, this command exits with a non-zero status when it finds lint errors, which fails the build. You can configure rule severity as error, warn, or info. During migration, set new or uncertain rules to warn so CI passes while the team adjusts, then promote them to error once the codebase is clean.
Example CI step concept:
- run: npx @biomejs/biome check
Limitations to verify before you migrate
- Biome does not implement every ESLint rule. Custom rules and specialized framework plugins may have no equivalent.
- The configuration schema and default rules can change between releases. Pin the Biome version in
package.jsonor your CI image. - Format-on-save depends on the Biome editor extension being installed and enabled for the workspace.
biome check --writemodifies source files directly, so review changes on a branch before merging.
Practical verification before enabling CI
- Run
npx @biomejs/biome --versionand record the version to pin. - Run
npx @biomejs/biome checkon clean code and confirm it passes. - Introduce an intentional lint error in a test file, run the same command, and confirm it fails.
- Run
npx @biomejs/biome check --writeon a sample file, inspectgit diff, and decide whether the formatting style matches your team's expectations.
If verification passes, enable biome check in CI and remove the duplicate Prettier and ESLint configuration files. If a rule you depend on is missing, keep ESLint for that rule set or file a request with the Biome project rather than assuming the behavior exists.
Rollback
Because biome check --write changes state, the rollback is to restore modified files from version control. Use git checkout -- <file> for individual files or revert the merge commit if the changes have already been integrated.
Biome works best when the team agrees on one configuration file and one command. Start with warnings, verify the rules you actually use, and pin the version before CI blocks a release.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.