diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f133ef2602c..ac4765b877f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b ### Analyzer +#### Bug fixes + +- Improved the message for unused suppression comments. Contributed by @dyc3 + ### CLI ### Configuration diff --git a/crates/biome_analyze/src/lib.rs b/crates/biome_analyze/src/lib.rs index ed5e3e2ad914..424ecba73e26 100644 --- a/crates/biome_analyze/src/lib.rs +++ b/crates/biome_analyze/src/lib.rs @@ -182,7 +182,7 @@ where SuppressionDiagnostic::new( category!("suppressions/unused"), suppression.comment_span, - "Suppression comment is not being used", + "Suppression comment has no effect. Remove the suppression or make sure you are suppressing the correct rule.", ) }); diff --git a/crates/biome_js_analyze/tests/specs/correctness/noUnreachable/SuppressionComments.js.snap b/crates/biome_js_analyze/tests/specs/correctness/noUnreachable/SuppressionComments.js.snap index 0f1ed4c0a12e..6dfcb5c4920d 100644 --- a/crates/biome_js_analyze/tests/specs/correctness/noUnreachable/SuppressionComments.js.snap +++ b/crates/biome_js_analyze/tests/specs/correctness/noUnreachable/SuppressionComments.js.snap @@ -92,7 +92,7 @@ SuppressionComments.js:11:5 suppressions/deprecatedSuppressionComment FIXABLE ``` SuppressionComments.js:1:1 suppressions/unused ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Suppression comment is not being used + ! Suppression comment has no effect. Remove the suppression or make sure you are suppressing the correct rule. > 1 │ // rome-ignore lint/correctness/noUnreachable: this comment does nothing │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/ignoredDependencies.js.snap b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/ignoredDependencies.js.snap index 766207a60e42..31b558b07d3a 100644 --- a/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/ignoredDependencies.js.snap +++ b/crates/biome_js_analyze/tests/specs/correctness/useExhaustiveDependencies/ignoredDependencies.js.snap @@ -57,7 +57,7 @@ ignoredDependencies.js:8:5 lint/correctness/useExhaustiveDependencies ━━━ ``` ignoredDependencies.js:16:5 suppressions/unused ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Suppression comment is not being used + ! Suppression comment has no effect. Remove the suppression or make sure you are suppressing the correct rule. 14 │ function IgnoredDependencies2() { 15 │ let a = 1;