Biome is a toolchain that does both linting and formatting for web projects. One config, one CLI, one dependency. It is written in Rust and is very fast. The formatter aims for high compatibility with Prettier, so migration is straightforward.
What is Biome?
Biome combines several tools into one:
| Feature | What it does |
|---|---|
| Formatter | Formats JS, TS, JSX, JSON, CSS, HTML, GraphQL |
| Linter | Catches bugs and style issues with hundreds of rules |
| Import organizer | Sorts and groups imports |
| CLI | Single command for all operations |
One config file, one dependency. No more coordinating ESLint, Prettier, and import sorters.
Why Biome over ESLint + Prettier?
| Aspect | ESLint + Prettier | Biome |
|---|---|---|
| Speed | Slow (JavaScript) | Fast (Rust, 10-100x faster) |
| Config | Two config files | One config file |
| Dependencies | Multiple packages | Single package |
| Format + lint | Separate commands | One check command |
| Plugin ecosystem | Extensive | Growing |
Biome is best for teams that want speed and simplicity. If you rely heavily on specific ESLint plugins, check if Biome has equivalent rules.
Installation
npm install -D @biomejs/biome
Or with other package managers:
pnpm add -D @biomejs/biome
yarn add -D @biomejs/biome
bun add -D @biomejs/biome
Configuration
Initialize a config file:
npx @biomejs/biome init
This creates biome.json:
{
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"organizeImports": {
"enabled": true
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}
Formatter options
{
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100,
"lineEnding": "lf"
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "always",
"trailingCommas": "all"
}
}
}
Linter rules
{
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noExcessiveCognitiveComplexity": "warn"
},
"suspicious": {
"noExplicitAny": "error"
},
"style": {
"useConst": "error"
}
}
}
}
Ignore files
{
"files": {
"ignore": [
"node_modules",
"dist",
".next",
"coverage"
]
}
}
Running Biome
Check formatting (no changes)
npx @biomejs/biome format ./src
Apply formatting
npx @biomejs/biome format --write ./src
Run linter
npx @biomejs/biome lint ./src
Apply safe lint fixes
npx @biomejs/biome lint --write ./src
Check everything (recommended)
# Check only (for CI)
npx @biomejs/biome check ./src
# Check and fix (for local development)
npx @biomejs/biome check --write ./src
The check command runs formatting, linting, and import organization.
Package.json scripts
{
"scripts": {
"lint": "biome check .",
"lint:fix": "biome check --write .",
"format": "biome format --write ."
}
}
Editor integration
VS Code
Install the Biome VS Code extension.
Add to .vscode/settings.json:
{
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"quickfix.biome": "explicit",
"source.organizeImports.biome": "explicit"
}
}
Other editors
Biome has plugins for JetBrains IDEs, Neovim, Helix, and others. Check the Biome editor integrations.
Migrating from Prettier
Biome's formatter is designed to be Prettier-compatible:
- Run both in parallel on a test branch
- Compare output and fix any differences
- Update config to match your Prettier settings
- Remove Prettier once formatting matches
Most projects can migrate with minimal changes. Some edge cases (like very specific formatting preferences) may differ.
Migrating from ESLint
Biome covers many common ESLint rules:
| ESLint rule | Biome equivalent |
|---|---|
no-unused-vars |
correctness/noUnusedVariables |
no-console |
suspicious/noConsoleLog |
prefer-const |
style/useConst |
eqeqeq |
suspicious/noDoubleEquals |
no-explicit-any |
suspicious/noExplicitAny |
Check the Biome rules documentation for the full list and equivalents.
Migration steps
- List your current ESLint rules
- Find Biome equivalents (many are built-in)
- Identify unsupported rules (some plugin rules)
- Run both tools during transition
- Gradually remove ESLint as coverage is confirmed
CI integration
# GitHub Actions
- name: Lint and format check
run: npx @biomejs/biome check .
Biome exits with error code 1 if issues are found, failing the CI check.
Biome vs alternatives
| Tool | Speed | Format | Lint | Single config |
|---|---|---|---|---|
| Biome | Very fast | Yes | Yes | Yes |
| ESLint + Prettier | Slow | Yes | Yes | No |
| dprint | Very fast | Yes | No | Yes |
| Rome (deprecated) | Fast | Yes | Yes | Yes |
Biome is the successor to Rome, with active development and growing adoption.
When to use Biome
Good fit:
- New projects wanting fast, unified tooling
- Teams tired of ESLint + Prettier configuration
- CI pipelines where speed matters
- Projects using standard rules
Consider alternatives if:
- You rely on specific ESLint plugins not yet in Biome
- You need rules Biome does not support
- Your team has heavy ESLint customization
Summary
Biome provides fast, unified linting and formatting:
- Install with
npm install -D @biomejs/biome - Initialize with
biome init - Configure formatter and linter in
biome.json - Run with
biome check --writefor local,biome checkfor CI - Integrate with your editor for format-on-save
The Biome documentation has the full rule list and configuration options.
