-
-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(analyzer): top-level suppressions
- Loading branch information
Showing
21 changed files
with
714 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
cli: minor | ||
--- | ||
|
||
# New top-level suppression for the analyzer | ||
|
||
The Biome analyzer now supports a new top-level suppression. These suppression have to be placed at the top of the file, and they **must** be multiple line comments. | ||
|
||
The analyzer rules specified inside the block comment will be suppressed for the whole file. | ||
|
||
In the example, we suppress the rules `lint/style/useConst` and `lint/suspicious/noDebugger` for the whole file: | ||
|
||
```js | ||
// main.js | ||
/** | ||
* biome-ignore lint/style/useConst: i like let | ||
* biome-ignore lint/suspicious/noDebugger: needed now | ||
*/ | ||
|
||
let path = "/path"; | ||
let _tmp = undefined; | ||
debugger | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
cli: major | ||
--- | ||
|
||
# Remove support for legacy suppressions | ||
|
||
Biome used to support "legacy suppressions" that looked like this: | ||
|
||
```js | ||
// biome-ignore lint(style/useWhile): reason | ||
``` | ||
|
||
This format is no longer supported. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.