| | |

Biome 28 ๐Ÿงน Cheatsheet

โฑ๏ธ Estimated read: 5 min | |

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

CommandToolsWritesUse for
biome formatFormatter onlyWith --writeThe formatting fix
biome lintLinter onlyWith --writeThe lint fix
biome checkFormatter, linter, assistWith --writeThe full local audit
biome ciFormatter, linter, assistNeverThe CI pipeline
biome initโ€”Creates biome.jsonThe 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

FlagPurpose
--writeApply the safe fixes
--unsafeApply the behavior-changing fixes (requires --write)
--stagedThe Git-index files only (the pre-commit hook)
--changedThe files changed from the base branch (the CI)
--since=<ref>Override the base branch
--no-errors-on-unmatchedSuppress the empty-match error
--files-ignore-unknown=trueIgnore the unsupported file types
--error-on-warningsFail on the warnings
--max-diagnostics=NCap the printed diagnostics
--enforce-assistSurface the assist-action failures
--reporter=github|gitlab|jsonThe output format

The biome.json Structure

SectionPurpose
$schemaThe editor validation
formatterThe formatting options
linterThe lint rules and the domains
assistThe code actions
files.includesThe file selection
vcsThe .gitignore integration
overridesThe per-file configuration
pluginsThe GritQL plugins

The Formatter Options

OptionValuesDefault
indentStyle"tab", "space""tab"
indentWidthNumber2
lineWidthNumber80
lineEnding"lf", "crlf", "cr""lf"

The javascript.formatter block has the quoteStyle, the jsxQuoteStyle, the semicolons, and the trailingCommas.


The Linter Severity Levels

SeverityCLI exitPurpose
offNoThe rule is disabled
infoNoThe informational
warnNo (unless --error-on-warnings)The warning
errorYesThe 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

PatternMatches
*The zero or more characters, not the /
**The recursive directories and files
[0-9]The character range
[!...]The negated character class
!patternThe 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

FieldPurpose
includesThe glob patterns that select the files
The tool sectionsThe 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

PrefixScope
biome-ignoreThe next line
biome-ignore-allThe entire file (at the top)
biome-ignore-start / biome-ignore-endThe range
CategoryTarget
lint/group/ruleThe lint rule
assist/source/organizeImportsThe assist action
syntaxThe syntax diagnostic

The explanation after the colon is required in practice.


The Domains

DomainDetected from
reactreact >= 16.0.0
nextnext >= 14.0.0
testjest, vitest, mocha, ava
playwright@playwright/test
projectManual opt-in (the cross-file analysis)

The domain modes are "all", "recommended", and "none".


The Migration Commands

CommandPurpose
biome migrate prettier --writePort the Prettier config
biome migrate eslint --writePort the ESLint config
biome migrate eslint --include-inspired --writeAdd the inspired rules
biome migrate eslint --include-nursery --writeAdd the nursery rules

The migration sets the recommended: false and enables only the migrated rules.


The Removal Steps

StepAction
1Delete .eslintrc*, eslint.config.*, .prettierrc*, prettier.config.*
2Delete .eslintignore, .prettierignore
3Uninstall eslint, prettier, eslint-config-prettier, the plugins
4Update the scripts to biome check / biome ci
5Replace the ESLint and Prettier editor extensions
6Enable the VCS integration for the .gitignore

The Pre-Commit Hook

MechanismConfiguration
Husky + lint-staged"*.{js,ts,jsx,tsx}": "biome check --write"
The manual hookbiome check --staged --write && git add -u
LefthookThe stage_fixed: true
pre-commitThe 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

RunnerSetup
GitHub Actionsbiomejs/setup-biome@v2 then biome ci .
External configThe actions/setup-node and the npm ci before
GitLab CIThe ghcr.io/biomejs/biome:latest image
The reportThe --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

AreaKey takeaway
The commandscheck (local), ci (pipeline), format, lint
The writes--write and --unsafe
The scopes--staged (hook), --changed (CI)
The configThe one biome.json
The formatterThe indentStyle defaults to "tab"
The linterThe recommended: true is the curated set
The filesThe files.includes is the ordered array
The suppressionsThe biome-ignore comment
The migrationThe biome migrate commands
The CIThe 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.

Was this helpful?


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!