Consolidate Formatting and Import Cleanup with Biome
Use Biome's check command and organizeImports to replace separate Prettier and ESLint import rules.
17 Nov 2025, 15:56 UTC

Why your CI runs three tools for one job
Many JavaScript and TypeScript repositories still format code with Prettier, lint imports with an ESLint plugin, and run a separate import-sorting step in CI. Each tool has its own config file, its own version to pin, and its own failure mode. A pull request can pass Prettier but fail ESLint's import-order rule, or vice versa, creating noise that has nothing to do with application logic.
What Biome check replaces
Biome is a single Rust binary that combines formatting, linting, and import organization. Its biome check command runs the formatter and linter together. The formatter's organizeImports option removes unused imports and sorts import statements, which covers a common reason teams add ESLint import plugins in the first place.
Configuration lives in biome.jsonc, a JSON-with-comments file. You enable import organization under the formatter key and select linter rule groups under linter. Because Biome is one binary, CI can invoke a single command instead of separate Prettier, ESLint, and import-sort steps.
Worked example: enable organizeImports
Run these commands in your project root. You need read access to the repository and write access only if you use --write.
- Create
biome.jsonc:
{
// Replace with your installed Biome version
"$schema": "https://biomejs.dev/schemas//schema.json",
"organizeImports": {
"enabled": true
},
"linter": {
"rules": {
"recommended": true
}
},
"formatter": {
"indentStyle": "space",
"indentWidth": 2
}
}
- Add a temporary TypeScript file with an unused import:
import { unusedHelper } from "./utils";
export function greet(name: string): string {
return `Hello, ${name}`;
}
- Run the check:
biome check src/temp-example.ts
Biome reports the unused import as a diagnostic when organizeImports is enabled. Run echo $? on macOS/Linux or echo %ERRORLEVEL% on Windows after the command; a non-zero exit code means Biome found issues. biome check does not modify files by default, so this step is read-only.
- Apply changes only when you are ready:
biome format --write src/temp-example.ts
--write changes files in place. If you use it, inspect the result with git diff before committing, and revert with git checkout -- src/temp-example.ts if the formatting is unexpected.
Editor integration and CI
Biome provides an LSP for format-on-save and real-time diagnostics in VS Code and other LSP-compatible editors. Install the Biome extension, open a JavaScript or TypeScript file, and save to confirm the editor applies Biome's formatting rules. In CI, pin the Biome version in your container or package manager and run biome check on changed files or the whole repository.
Limitations to verify before dropping ESLint
Biome's rule set is smaller than ESLint's ecosystem. Custom ESLint rules, domain-specific plugins, and some type-aware linting may have no equivalent. Treat Biome as a replacement for formatting and common import rules, not necessarily a full ESLint substitute. Run both tools in parallel during a trial period and compare diagnostic counts before removing ESLint from CI.
Because Biome is a young project, behavior can change between releases. Pin the version and review release notes before upgrading.
Practical check
After adding biome.jsonc, run biome --version to confirm the binary, then run biome check on a sample file. If the unused-import diagnostic appears and the exit code is non-zero, the integration is working. Remove the temporary test file and commit the configuration.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.