From 57aa26dcccf865d2703ab9534eb3610903820f2e Mon Sep 17 00:00:00 2001 From: Yan <61414485+yanthomasdev@users.noreply.github.com> Date: Wed, 1 Jul 2026 16:50:46 -0300 Subject: [PATCH 1/2] feat(docs): Document plugin suppressions --- src/content/docs/analyzer/suppressions.mdx | 22 +++++++++++++++++++++- src/content/docs/linter/plugins.mdx | 3 +++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/content/docs/analyzer/suppressions.mdx b/src/content/docs/analyzer/suppressions.mdx index 0ed737d6c..0c3dd8e20 100644 --- a/src/content/docs/analyzer/suppressions.mdx +++ b/src/content/docs/analyzer/suppressions.mdx @@ -22,6 +22,8 @@ Suppression comments have the following format: // biome-ignore lint/suspicious: // biome-ignore lint/suspicious/noDebugger: // biome-ignore lint/suspicious/noDebugger(foo): +// biome-ignore lint/plugin: +// biome-ignore lint/plugin/: // biome-ignore-all lint: // biome-ignore-start lint: // biome-ignore-end lint: @@ -32,6 +34,7 @@ Let's break it down: - `biome-ignore`, `biome-ignore-all`, `biome-ignore-start` and `biome-ignore-end` are the start of a suppression comment. - After the space follows the **category** of the suppression comment. It can be `lint`, `assist`, or `syntax`. - The category is followed by an optional group, or group and name, separated by slashes. For example, `/suspicious` or `/suspicious/noDebugger`. The more you specify, the more specific (i.e. targeted) your suppression is. +- Plugin diagnostics use `lint/plugin`. You can target all plugins with `lint/plugin`, or a single plugin with `lint/plugin/`. - Some rules even allow you to specify values during suppression. These can be specified between parentheses, for example: `(foo)`. Refer to the rule documentation to see whether a rule supports suppression with values. - `` explanation why the rule is disabled. @@ -41,7 +44,6 @@ If you're unsure of the exact category of a rule/action, you can refer to their From here onwards, JavaScript is used to explain suppression comments, and the `lint` category is used. ::: - ### Inline suppressions They disable a lint rule for the **next line** of code. @@ -115,4 +117,22 @@ In the above code: - The `f == g` statement raises a diagnostic because the rule `noDoubleEquals` isn't suppressed anymore. - The comment `// biome-ignore-end lint/suspicious/noDebugger: reason` at line 10 terminates the suppression of `noDebugger` that was started by the suppression comment at line 2. +### Plugin suppressions + +They disable diagnostics emitted by [linter plugins](/linter/plugins). Use `lint/plugin` to suppress diagnostics from all plugins, or `lint/plugin/` to suppress diagnostics from one plugin. The `` is the plugin's file name without the `.grit` extension. + +In the following example, the suppression comment `biome-ignore lint/plugin/preferObjectSpread: reason` will disable diagnostics emitted by `preferObjectSpread.grit` for the next line: + +```js title="file.js" ins={1} +// biome-ignore lint/plugin/preferObjectSpread: reason +Object.assign({}, foo); +``` + +To suppress diagnostics from all plugins, omit the plugin name: + +```js title="file.js" ins={1} +// biome-ignore lint/plugin: reason +Object.assign({}, foo); +``` +Plugin suppressions can also be authored as [top-level](#top-level-suppressions) and [range](#range-suppressions) suppressions. diff --git a/src/content/docs/linter/plugins.mdx b/src/content/docs/linter/plugins.mdx index ac366b280..8bacff8a7 100644 --- a/src/content/docs/linter/plugins.mdx +++ b/src/content/docs/linter/plugins.mdx @@ -47,6 +47,9 @@ $ biome lint 14 │ } ``` +You can suppress plugin diagnostics with `lint/plugin` suppression comments. See +[plugin suppressions](/analyzer/suppressions#plugin-suppressions) for details. + Plugins can also suggest code rewrites using the `=>` operator: ```grit title="no-console.grit" From 798fdd36ab306a2c063887e7c071a65d90f4e335 Mon Sep 17 00:00:00 2001 From: Yan <61414485+yanthomasdev@users.noreply.github.com> Date: Fri, 3 Jul 2026 12:45:35 -0300 Subject: [PATCH 2/2] Update src/content/docs/analyzer/suppressions.mdx Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> --- src/content/docs/analyzer/suppressions.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/content/docs/analyzer/suppressions.mdx b/src/content/docs/analyzer/suppressions.mdx index 0c3dd8e20..a8f4f788d 100644 --- a/src/content/docs/analyzer/suppressions.mdx +++ b/src/content/docs/analyzer/suppressions.mdx @@ -119,7 +119,9 @@ In the above code: ### Plugin suppressions -They disable diagnostics emitted by [linter plugins](/linter/plugins). Use `lint/plugin` to suppress diagnostics from all plugins, or `lint/plugin/` to suppress diagnostics from one plugin. The `` is the plugin's file name without the `.grit` extension. +They disable diagnostics emitted by [linter plugins](/linter/plugins). + +Use `lint/plugin` to suppress diagnostics from all plugins, or `lint/plugin/` to suppress diagnostics from one plugin. The `` is the plugin's file name without the `.grit` extension. In the following example, the suppression comment `biome-ignore lint/plugin/preferObjectSpread: reason` will disable diagnostics emitted by `preferObjectSpread.grit` for the next line: