Biome linter.rules: Enable and Tune Lint Rules
linter.rules controls which lint rules run and at what severity, starting from the recommended baseline.
You configure rules by group (correctness, suspicious, style, and so on), turning the recommended set on and overriding individual rules.
What it does
linter.rules.recommended true enables the recommended rules. Within each group you set a rule to "off", "warn", "info", or "error", or to an object with a level and options. Setting a rule to error makes a violation fail biome ci.
Common usage
{
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": { "noConsole": "error" },
"style": { "noNonNullAssertion": "off" },
"correctness": {
"noUnusedVariables": { "level": "error" }
}
}
}
}Options
| Setting | What it does |
|---|---|
| recommended | Enable the recommended rule set |
| <group>: { <rule>: "error" } | Set a single rule severity |
| "off" | "warn" | "info" | "error" | Severity levels for a rule |
| { "level": "...", "options": {...} } | Rule with options |
| all (v1) | v1 group "all"; removed in v2 in favor of explicit rules |
In CI
Only error-level diagnostics fail biome ci by default; warn and info do not. To make warnings block the build, run with --error-on-warnings. Promote a rule from warn to error in config once the codebase is clean so regressions are caught.
Common errors in CI
"unknown rule" means a misspelled rule or a v1 rule renamed in v2. Setting "all": true under a group worked in v1 but errors in v2, where it was removed. A rule that never fires may be in the nursery group, which is off unless explicitly enabled.