Biome 20 🧹 Inline Suppressions — biome-ignore comments
The biome-ignore comment is the mechanism that disables a lint rule, an assist action, or a syntax check for the specific code without the configuration change. It is the escape hatch for the one-off case—the generated file, the intentional violation, the third-party pattern—that the project does not want to disable globally. The Biome documentation states the motivation plainly: the suppression is the mechanism that turns off the rule for the specific line, the range, or the entire file, and the same engine drives both the linter and the assist actions . The comment is the annotation that the analyzer reads, and the analyzer is the single engine that both the lint rules and the assist actions share.
The comment’s syntax is the precise contract. The biome-ignore is the prefix, the lint, the assist, or the syntax is the category, the /group/rule is the optional specificity, and the : <explanation> is the reason. The explanation is not optional in practice—the analyzer may report the unused suppression if the rule does not fire, and the explanation is the mechanism that the reviewer understands the intent . The biome-ignore-all is the file-level variant, the biome-ignore-start and the biome-ignore-end are the range variant, and the prefix is the mechanism that determines the scope.
Key point: The // biome-ignore lint/suspicious/noDebugger: <reason> disables the rule for the next line. The // biome-ignore-all disables the rule for the entire file and must be at the top. The // biome-ignore-start and the // biome-ignore-end disable the rule for the range. The assist category is the mechanism that suppresses the assist actions, such as the assist/source/organizeImports. The explanation is the mechanism that the reviewer understands the intent.
Why the suppression comments exist
The one-off problem. A project can have the rule that is enabled globally and the specific file that must not follow it. The generated file is the concrete example: the generated.js is the output of the code generator, and the noDebugger rule fires on the generated debugger statement, but the developer cannot edit the generated file. The // biome-ignore-all lint/suspicious/noDebugger: generated is the mechanism that disables the rule for the file, and the file-level suppression is the reason the developer does not disable the rule globally .
The intentional violation problem. A project can have the code that intentionally violates the rule—the noDoubleEquals in the loose-equality comparison, the noExplicitAny in the type assertion. The inline suppression is the mechanism that documents the intent, and the documentation is the reason the reviewer does not treat the violation as the oversight. The : <explanation> is the mechanism that carries the reason, and the reason is the difference between the deliberate exception and the forgotten violation.
The assist-action problem. The Biome’s assist actions—the organizeImports, the useSortedKeys—are the same suppression engine as the lint rules. The // biome-ignore assist/source/organizeImports: organized by hand is the mechanism that disables the import sorting for the file, and the suppression is the reason the hand-sorted barrel file is not re-sorted on the save . The assist category is the mechanism that covers the actions, and the coverage is the reason the suppression is the single engine.
The syntax problem. The syntax category is the mechanism that suppresses the syntax diagnostics, and the suppression is the reason the analyzer does not report the syntax the project intentionally uses. The biome-ignore syntax is the category, and the category is the mechanism that the analyzer recognizes.
The unused-suppression problem. The suppression/unused diagnostic is the mechanism that reports the suppression comment that does not suppress anything. The unused suppression is the hazard—the comment that stays after the code changes, and the stale comment is the confusion. The diagnostic is the mechanism that keeps the suppressions honest, and the honesty is the reason the developer removes the comment when the rule no longer fires.
a. The inline and the range suppressions
The inline suppression disables the rule for the next line. The comment is placed on the line above the code, and the analyzer reads the next line as the target.
// The inline suppression
// The biome-ignore disables the rule for the next line.
// biome-ignore lint/suspicious/noDebugger: debug is intentional for the demo
debugger;
// The debugger on the next line still fires the rule.
debugger;
The // biome-ignore lint/suspicious/noDebugger: reason is the mechanism that disables the rule for the debugger on the next line . The second debugger is the separate statement without the suppression, and the rule fires on it. The inline scope is the reason the second statement is the diagnostic.
The range suppression disables the rule from the biome-ignore-start to the biome-ignore-end. The range is the mechanism that covers the multiple lines without the comment on each one.
// The range suppression
// biome-ignore-start lint/suspicious/noDoubleEquals: legacy comparison
a == b;
c == d;
// biome-ignore-end lint/suspicious/noDoubleEquals: legacy comparison
// The next comparison fires the rule.
f == g;
The // biome-ignore-start lint/suspicious/noDoubleEquals: reason is the mechanism that starts the suppression, and the // biome-ignore-end lint/suspicious/noDoubleEquals: reason is the mechanism that ends it . The a == b and the c == d are the suppressed lines, and the f == g is the diagnostic because the range ended.
The biome-ignore with the value is the mechanism that targets the specific value. The (foo) is the mechanism that suppresses the rule only when the value is the foo.
// The value suppression
// The rule is suppressed only for the "foo" value.
// biome-ignore lint/suspicious/noExplicitAny: the generic default is any
function identity<T = any>(value: T): T {
return value;
}
The (foo) is the mechanism that the rule documentation defines, and the value is the reason the suppression is the precise. The value is the optional, and the rule’s documentation is the mechanism that determines whether the rule supports it .
b. The top-level and the assist suppressions
The top-level suppression disables the rule for the entire file. The comment must be at the top of the file, and the placement is the mechanism that the analyzer recognizes it.
// The top-level suppression
// biome-ignore-all lint/suspicious/noDebugger: generated file
// The rule is disabled for every line in the file.
debugger;
The // biome-ignore-all lint/suspicious/noDebugger: reason is the mechanism that disables the rule for the file . The placement at the top is the requirement, and the requirement is the reason the analyzer treats the comment as the file-level. The comment that is not at the top is the unused, and the unused is the diagnostic.
The assist suppression is the mechanism that disables the assist action. The assist/source/organizeImports is the category, and the category is the mechanism that the analyzer recognizes.
// The assist suppression
// biome-ignore assist/source/organizeImports: organized by hand
import B from "b";
import A from "a";
The // biome-ignore assist/source/organizeImports: reason is the mechanism that disables the import sorting for the file . The first import is the target, and the target is the reason the analyzer reads the suppression. The biome check --write applies the assist actions, and the suppression is the mechanism that the action respects.
The top-level assist suppression is the biome-ignore-all assist/source/organizeImports, and the comment is the mechanism that disables the sorting for the whole file. The issue #7130 notes the warning “Suppression comment has no effect because the tool is not enabled” when the biome lint is run instead of the biome check, and the warning is the mechanism that the assist suppression requires the check command . The distinction is the reason the suppression is the check-command feature.
Complete Example Session
// ============================================
// PART 1: THE INLINE SUPPRESSION
// ============================================
// biome-ignore lint/suspicious/noDebugger: debug is intentional for the demo
debugger;
// The next line is the target.
// The rule is disabled for the next line only.
// ============================================
// PART 2: THE RANGE SUPPRESSION
// ============================================
// biome-ignore-start lint/suspicious/noDoubleEquals: legacy comparison
a == b;
c == d;
// biome-ignore-end lint/suspicious/noDoubleEquals: legacy comparison
f == g;
// The a == b and the c == d are suppressed.
// The f == g fires the rule.
// ============================================
// PART 3: THE TOP-LEVEL SUPPRESSION
// ============================================
// biome-ignore-all lint/suspicious/noDebugger: generated file
debugger;
debugger;
// The rule is disabled for the whole file.
// ============================================
// PART 4: THE ASSIST SUPPRESSION
// ============================================
// biome-ignore assist/source/organizeImports: organized by hand
import B from "b";
import A from "a";
// The imports are not organized.
// ============================================
// PART 5: THE VALUE SUPPRESSION
// ============================================
// biome-ignore lint/suspicious/noExplicitAny: the generic default is any
function identity<T = any>(value: T): T {
return value;
}
// The suppression is the specific to the rule.
// The value is the optional.
// ============================================
// PART 6: THE UNUSED SUPPRESSION
// ============================================
// biome-ignore lint/suspicious/noDebugger: reason
const value = 42;
// The rule does not fire on the const.
// The suppression is the unused.
// The analyzer reports the suppression/unused.
// ============================================
// PART 7: THE UNUSED SUPPRESSION DIAGNOSTIC
// ============================================
// The suppression/unused is the category.
// The category is the mechanism that keeps the suppressions honest.
// ============================================
// PART 8: THE ASSIST WARNING
// ============================================
// The biome lint does not run the assist actions.
// The suppression has no effect with the lint command.
// The biome check runs the assist actions.
// ============================================
// PART 9: THE SUPPRESS CLI OPTION
// ============================================
// The biome lint --suppress "reason" adds the suppression comment.
// The option is the mechanism that the developer does not write the comment.
// ============================================
// PART 10: THE CHECKLIST
// ============================================
// [ ] The inline suppression is the next line only.
// [ ] The range suppression has the start and the end.
// [ ] The top-level suppression is at the top of the file.
// [ ] The assist suppression uses the check command.
// [ ] The explanation is the reason.
// [ ] The unused suppression is removed.
The ten parts covered the inline suppression, the range suppression, the top-level suppression, the assist suppression, the value suppression, the unused suppression, the diagnostic, the assist warning, the suppress option, and the checklist. The through-line is that the prefix is the scope, and the explanation is the reason.
Quick Reference
The suppression prefixes
| Prefix | Scope |
|---|---|
biome-ignore | The next line |
biome-ignore-all | The entire file, at the top |
biome-ignore-start | The range start |
biome-ignore-end | The range end |
The categories
| Category | Target |
|---|---|
lint | The lint rules |
assist | The assist actions |
syntax | The syntax diagnostics |
The specificity
| Form | Target |
|---|---|
lint | All the lint rules |
lint/suspicious | The suspicious group |
lint/suspicious/noDebugger | The specific rule |
lint/suspicious/noDebugger(foo) | The rule with the value |
The assist suppression
| Form | Target |
|---|---|
assist/source/organizeImports | The import organizer |
assist/source/useSortedKeys | The sorted keys |
Best Practices
✅ Do This:
// Use the inline suppression for the one line
// biome-ignore lint/suspicious/noDebugger: intentional
debugger; // ✅
// Use the top-level suppression for the generated file
// biome-ignore-all lint/suspicious/noDebugger: generated // ✅
// Use the assist suppression for the hand-sorted file
// biome-ignore assist/source/organizeImports: organized by hand // ✅
❌ Don’t Do This:
// Use the suppression without the explanation
// biome-ignore lint/suspicious/noDebugger // ❌
// Leave the unused suppression
// biome-ignore lint/suspicious/noDebugger: reason
const value = 42; // the suppression is unused // ❌
// Use the assist suppression with the lint command
biome lint // the suppression has no effect // ❌
Common Pitfalls
| Pitfall | Why It Happens | Fix |
|---|---|---|
| The suppression does not apply | The comment is not on the line above | Move the comment to the line above |
| The top-level suppression is ignored | The comment is not at the top | Move the comment to the file top |
| The assist suppression has no effect | The biome lint is used | Use the biome check |
| The unused suppression is reported | The rule no longer fires | Remove the comment |
Real-World Examples
1. The inline suppression
// biome-ignore lint/suspicious/noDebugger: intentional
debugger;
2. The range suppression
// biome-ignore-start lint/suspicious/noDoubleEquals: legacy
a == b;
// biome-ignore-end lint/suspicious/noDoubleEquals: legacy
3. The top-level suppression
// biome-ignore-all lint/suspicious/noDebugger: generated
4. The assist suppression
// biome-ignore assist/source/organizeImports: organized by hand
5. The value suppression
// biome-ignore lint/suspicious/noExplicitAny: the default
6. The syntax suppression
// biome-ignore syntax: the intentional syntax
7. The unused suppression
// biome-ignore lint/suspicious/noDebugger: reason
const value = 42; // the suppression is unused
8. The assist warning
// The biome lint does not run the assist actions.
9. The suppress option
biome lint --suppress "reason" file.js
10. The check command
biome check --write file.js
Visual
The Suppression Scope
┌──────────────────────────────────────────────────────────────┐
│ THE SUPPRESSION SCOPE │
│ │
│ biome-ignore │
│ ┌─────────────────────┐ │
│ │ The next line │ The inline │
│ └─────────────────────┘ │
│ │
│ biome-ignore-start / biome-ignore-end │
│ ┌─────────────────────┐ │
│ │ The range │ The multiple lines │
│ └─────────────────────┘ │
│ │
│ biome-ignore-all │
│ ┌─────────────────────┐ │
│ │ The entire file │ The top of the file │
│ └─────────────────────┘ │
└──────────────────────────────────────────────────────────────┘
The Assist Suppression
┌──────────────────────────────────────────────────────────────┐
│ THE ASSIST SUPPRESSION │
│ │
│ The import organizer │
│ │ │
│ ▼ │
│ ┌─────────────────────┐ │
│ │ biome-ignore assist │ The category │
│ │ /source/organize │ │
│ │ Imports │ │
│ └──────────┬──────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────┐ │
│ │ The imports are │ The action is disabled │
│ │ not organized │ │
│ └─────────────────────┘ │
└──────────────────────────────────────────────────────────────┘
The Unused Suppression
┌──────────────────────────────────────────────────────────────┐
│ THE UNUSED SUPPRESSION │
│ │
│ The suppression comment │
│ │ │
│ ▼ │
│ ┌─────────────────────┐ │
│ │ The rule does not │ The code changed │
│ │ fire │ │
│ └──────────┬──────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────┐ │
│ │ The suppression/ │ The diagnostic │
│ │ unused │ │
│ └─────────────────────┘ │
└──────────────────────────────────────────────────────────────┘
Summary
| Item | Value |
|---|---|
| The inline | // biome-ignore lint/group/rule: reason |
| The file | // biome-ignore-all lint/group/rule: reason |
| The range | // biome-ignore-start and // biome-ignore-end |
| The assist | // biome-ignore assist/source/organizeImports: reason |
| The syntax | // biome-ignore syntax: reason |
| The unused | The suppression/unused diagnostic |
| The suppress option | The biome lint --suppress "reason" |
Key takeaways:
- The
biome-ignorecomment is the single suppression engine. The same engine drives the lint rules and the assist actions, and the category (lint,assist,syntax) is the mechanism that targets the right tool . - The inline suppression is the next line only. The comment on the line above the code disables the rule for that one line, and the next statement without the comment still fires the rule .
- The top-level suppression is the entire file and must be at the top. The
biome-ignore-allis the prefix, and the placement is the requirement. The comment that is not at the top is the unused, and the unused is the diagnostic . - The assist suppression uses the same syntax. The
assist/source/organizeImportsis the category, and thebiome checkis the command that runs the assist actions. Thebiome lintdoes not run the assist, and the suppression has no effect with the lint command . - The unused suppression is the diagnostic. The
suppression/unusedreports the comment that does not suppress anything, and the diagnostic is the mechanism that keeps the suppressions honest.
Remember: The Biome inline suppression is the biome-ignore comment. The inline disables the next line, the range disables the multiple lines, and the top-level disables the file. The assist category covers the assist actions, and the syntax covers the syntax diagnostics. The explanation is the reason, and the unused diagnostic keeps the comments honest.
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!