What Is Biome?
Biome (formerly Rome) is a Rust-based toolchain that replaces ESLint and Prettier with a single binary. It formats code, lints it, and can fix many issues automatically — all in the same tool, in the same pass, with one config file.
Installation
pnpm add -D --save-exact @biomejs/biome
# Initialize config
npx @biomejs/biome init
This creates biome.json:
{
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": { "recommended": true }
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"trailingCommas": "all"
}
}
}
Speed Comparison
On a 100-file TypeScript project:
| Tool | Operation | Time | |------|-----------|------| | Prettier | Format 100 files | 4.2s | | ESLint | Lint 100 files | 8.7s | | Biome | Format + lint 100 files | 0.18s |
Biome processes both operations in a single AST parse pass. The Rust runtime eliminates JavaScript VM overhead entirely.
Running Biome
# Check (lint + format) without fixing
npx @biomejs/biome check .
# Check and auto-fix
npx @biomejs/biome check --write .
# Format only
npx @biomejs/biome format --write .
# Lint only
npx @biomejs/biome lint .
Lint Rules
Biome ships 200+ rules covering ESLint, TypeScript-ESLint, and more:
{
"linter": {
"rules": {
"recommended": true,
"correctness": {
"noUnusedVariables": "error",
"useExhaustiveDependencies": "warn"
},
"suspicious": {
"noExplicitAny": "warn",
"noConsoleLog": "warn"
},
"style": {
"noNonNullAssertion": "warn",
"useConst": "error"
}
}
}
}
Migrating From ESLint + Prettier
Biome provides automated migration commands:
# Migrate from Prettier
npx @biomejs/biome migrate prettier --write
# Migrate from ESLint
npx @biomejs/biome migrate eslint --write
These commands read your .eslintrc and .prettierrc files and generate the equivalent biome.json configuration. After migrating:
# Remove old tools
pnpm remove eslint prettier eslint-config-prettier @typescript-eslint/eslint-plugin @typescript-eslint/parser
# Update package.json scripts
# "lint": "eslint ." → "lint": "biome check ."
# "format": "prettier --write ." → (handled by biome check --write)
CI Integration
# .github/workflows/ci.yml
- name: Lint and format check
run: npx @biomejs/biome ci .
# ci mode: exits with error on any issue, no auto-fix
Monorepo Config With extends
// packages/ui/biome.json
{
"extends": ["../../biome.json"],
"linter": {
"rules": {
"style": { "noDefaultExport": "off" }
}
}
}
The VS Code extension is available and works out of the box — format on save, inline diagnostics, quick fixes.
References: Biome · GitHub · migration guide