Skip to content
Latchkey

biome lint: Run Only the Linter

biome lint runs just the linter over your files and reports rule violations without touching formatting.

Use lint when you want linting alone, for instance in a job separate from formatting, or to apply only the linter safe fixes.

What it does

biome lint analyzes the given paths with the enabled lint rules and prints diagnostics. By default it only reports and exits non-zero on error-level findings. With --write it applies the safe fixes that rules provide.

Common usage

Terminal
npx @biomejs/biome lint ./src
# apply safe lint fixes
npx @biomejs/biome lint --write ./src
# run a single rule
npx @biomejs/biome lint --only=correctness/noUnusedVariables ./src

Options

FlagWhat it does
--writeApply safe lint fixes (replaces v1 --apply)
--unsafeAlso apply unsafe fixes (with --write)
--only=<group/rule>Run only the named rule or group
--skip=<group/rule>Skip the named rule or group
--error-on-warningsExit non-zero on warnings too
--reporter=githubEmit GitHub Actions annotations

Common errors in CI

lint exits 1 on any error-level diagnostic. "Unknown rule" from --only/--skip means a misspelled rule name or a v1 path used on v2 (some rules were renamed and groups reorganized). If a rule you expect is silent, it may be disabled by default; enable it under linter.rules in biome.json.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →