Biome 28 ๐งน Cheatsheet
Biome 2.x is a single Rust binary that replaces ESLint and Prettier with one parse pass and one configuration file. The cheatsheet is scoped to the decisions you make mid-build: which command to run, how to configure the tools, how to migrate, how to suppress a rule, and how to read the error when the configuration does not apply.
The Three Commands
| Command | Tools | Writes | Use for |
|---|---|---|---|
biome format | Formatter only | With --write | The formatting fix |
biome lint | Linter only | With --write | The lint fix |
biome check | Formatter, linter, assist | With --write | The full local audit |
biome ci | Formatter, linter, assist | Never | The CI pipeline |
biome init | โ | Creates biome.json | The project setup |
The check command runs the three tools in the single parse pass. The ci command is the read-only variant that the pipeline uses.
The Key Flags
| Flag | Purpose |
|---|---|
--write | Apply the safe fixes |
--unsafe | Apply the behavior-changing fixes (requires --write) |
--staged | The Git-index files only (the pre-commit hook) |
--changed | The files changed from the base branch (the CI) |
--since=<ref> | Override the base branch |
--no-errors-on-unmatched | Suppress the empty-match error |
--files-ignore-unknown=true | Ignore the unsupported file types |
--error-on-warnings | Fail on the warnings |
--max-diagnostics=N | Cap the printed diagnostics |
--enforce-assist | Surface the assist-action failures |
--reporter=github|gitlab|json | The output format |
The biome.json Structure
| Section | Purpose |
|---|---|
$schema | The editor validation |
formatter | The formatting options |
linter | The lint rules and the domains |
assist | The code actions |
files.includes | The file selection |
vcs | The .gitignore integration |
overrides | The per-file configuration |
plugins | The GritQL plugins |
The Formatter Options
| Option | Values | Default |
|---|---|---|
indentStyle | "tab", "space" | "tab" |
indentWidth | Number | 2 |
lineWidth | Number | 80 |
lineEnding | "lf", "crlf", "cr" | "lf" |
The javascript.formatter block has the quoteStyle, the jsxQuoteStyle, the semicolons, and the trailingCommas.
The Linter Severity Levels
| Severity | CLI exit | Purpose |
|---|---|---|
off | No | The rule is disabled |
info | No | The informational |
warn | No (unless --error-on-warnings) | The warning |
error | Yes | The error |
The recommended: true enables the curated set, and the "on" keeps the rule’s default severity (which may be info, not error).
The files.includes Globs
| Pattern | Matches |
|---|---|
* | The zero or more characters, not the / |
** | The recursive directories and files |
[0-9] | The character range |
[!...] | The negated character class |
!pattern | The exception |
The array is ordered: the include patterns build the set, and the ! patterns remove from it. The exceptions are processed in order, so a later include can re-include.
The Overrides
| Field | Purpose |
|---|---|
includes | The glob patterns that select the files |
| The tool sections | The configuration for the matched files |
The order matters: the later override wins when multiple match. The negative ! excludes the files from the override.
The Suppression Comments
| Prefix | Scope |
|---|---|
biome-ignore | The next line |
biome-ignore-all | The entire file (at the top) |
biome-ignore-start / biome-ignore-end | The range |
| Category | Target |
|---|---|
lint/group/rule | The lint rule |
assist/source/organizeImports | The assist action |
syntax | The syntax diagnostic |
The explanation after the colon is required in practice.
The Domains
| Domain | Detected from |
|---|---|
react | react >= 16.0.0 |
next | next >= 14.0.0 |
test | jest, vitest, mocha, ava |
playwright | @playwright/test |
project | Manual opt-in (the cross-file analysis) |
The domain modes are "all", "recommended", and "none".
The Migration Commands
| Command | Purpose |
|---|---|
biome migrate prettier --write | Port the Prettier config |
biome migrate eslint --write | Port the ESLint config |
biome migrate eslint --include-inspired --write | Add the inspired rules |
biome migrate eslint --include-nursery --write | Add the nursery rules |
The migration sets the recommended: false and enables only the migrated rules.
The Removal Steps
| Step | Action |
|---|---|
| 1 | Delete .eslintrc*, eslint.config.*, .prettierrc*, prettier.config.* |
| 2 | Delete .eslintignore, .prettierignore |
| 3 | Uninstall eslint, prettier, eslint-config-prettier, the plugins |
| 4 | Update the scripts to biome check / biome ci |
| 5 | Replace the ESLint and Prettier editor extensions |
| 6 | Enable the VCS integration for the .gitignore |
The Pre-Commit Hook
| Mechanism | Configuration |
|---|---|
| Husky + lint-staged | "*.{js,ts,jsx,tsx}": "biome check --write" |
| The manual hook | biome check --staged --write && git add -u |
| Lefthook | The stage_fixed: true |
| pre-commit | The biome-check hook |
The --staged flag is the scope, and the re-staging is the mechanism that the commit includes the fix.
The CI Integration
| Runner | Setup |
|---|---|
| GitHub Actions | biomejs/setup-biome@v2 then biome ci . |
| External config | The actions/setup-node and the npm ci before |
| GitLab CI | The ghcr.io/biomejs/biome:latest image |
| The report | The --reporter=gitlab --colors=off |
The ci command is the read-only variant, and the --changed is the flag that the pipeline uses instead of the --staged.
The One-Line Summary
One binary. One parse. One config. check for the local, ci for the pipeline, --staged for the hook, --changed for the CI.
Biome is the single Rust binary that formats, lints, and organizes the imports from one parse pass. The check command is the local audit, and the ci command is the read-only pipeline variant. The --staged flag is the pre-commit scope, and the --changed flag is the CI scope. The biome.json is the single configuration, and the GritQL plugins are the custom rules.
Summary
| Area | Key takeaway |
|---|---|
| The commands | check (local), ci (pipeline), format, lint |
| The writes | --write and --unsafe |
| The scopes | --staged (hook), --changed (CI) |
| The config | The one biome.json |
| The formatter | The indentStyle defaults to "tab" |
| The linter | The recommended: true is the curated set |
| The files | The files.includes is the ordered array |
| The suppressions | The biome-ignore comment |
| The migration | The biome migrate commands |
| The CI | The setup-biome action and the biome ci |
Remember: The Biome cheatsheet is the decisions. The check is the local command, and the ci is the pipeline command. The --write applies the fixes, and the --staged and the --changed are the scopes. The biome.json is the single config, and the biome-ignore is the suppression. The migration commands port the config, and the removal completes the switch.
Stop using slow, ad-bloated tool sites! ๐คฎ
๐ Search “KandZ Tools” on Google to use many professional utilities for free.
KandZ.me is the ultimate minimalist hub for:
โ
Finance (Mortgage, Interest, Inflation)
โ
Tech (Base64, JSON, Dev Suite, IP)
โ
Health (BMI, BMR, TDEE)
โ
Productivity (Timer, Workspace, QR)
โก๏ธ Fast & Private
๐ No data leaves your device
๐ 100% Free
๐ Use it now: https://tools.kandz.me
๐ Bookmark itโyouโll need it later!