-
-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: allow group as rule filter
- Loading branch information
Showing
18 changed files
with
544 additions
and
191 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
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
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
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
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
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
33 changes: 33 additions & 0 deletions
33
crates/biome_cli/tests/snapshots/main_commands_lint/lint_rule_filter_group.snap
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,33 @@ | ||
--- | ||
source: crates/biome_cli/tests/snap_test.rs | ||
expression: content | ||
--- | ||
## `biome.json` | ||
|
||
```json | ||
{ | ||
"linter": { | ||
"rules": { | ||
"suspicious": { | ||
"recommended": false | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## `check.js` | ||
|
||
```js | ||
|
||
export function CONSTANT_CASE(){ | ||
debugger; | ||
} | ||
|
||
``` | ||
|
||
# Emitted Messages | ||
|
||
```block | ||
Checked 1 file in <TIME>. No fixes needed. | ||
``` |
67 changes: 67 additions & 0 deletions
67
crates/biome_cli/tests/snapshots/main_commands_lint/lint_rule_filter_group_disabled.snap
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,67 @@ | ||
--- | ||
source: crates/biome_cli/tests/snap_test.rs | ||
expression: content | ||
--- | ||
## `biome.json` | ||
|
||
```json | ||
{ | ||
"linter": { | ||
"rules": { | ||
"suspicious": { | ||
"recommended": false | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## `check.js` | ||
|
||
```js | ||
|
||
export function CONSTANT_CASE(){ | ||
debugger; | ||
} | ||
|
||
``` | ||
|
||
# Termination Message | ||
|
||
```block | ||
lint ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× Some errors were emitted while running checks. | ||
``` | ||
|
||
# Emitted Messages | ||
|
||
```block | ||
check.js:3:9 lint/suspicious/noDebugger FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× This is an unexpected use of the debugger statement. | ||
2 │ export function CONSTANT_CASE(){ | ||
> 3 │ debugger; | ||
│ ^^^^^^^^^ | ||
4 │ } | ||
5 │ | ||
i Unsafe fix: Remove debugger statement | ||
1 1 │ | ||
2 2 │ export function CONSTANT_CASE(){ | ||
3 │ - ········debugger; | ||
4 3 │ } | ||
5 4 │ | ||
``` | ||
|
||
```block | ||
Checked 1 file in <TIME>. No fixes needed. | ||
Found 1 error. | ||
``` |
33 changes: 33 additions & 0 deletions
33
...ome_cli/tests/snapshots/main_commands_lint/lint_rule_filter_group_with_disabled_rule.snap
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,33 @@ | ||
--- | ||
source: crates/biome_cli/tests/snap_test.rs | ||
expression: content | ||
--- | ||
## `biome.json` | ||
|
||
```json | ||
{ | ||
"linter": { | ||
"rules": { | ||
"suspicious": { | ||
"noDebugger": "off" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## `check.js` | ||
|
||
```js | ||
|
||
export function CONSTANT_CASE(){ | ||
debugger; | ||
} | ||
|
||
``` | ||
|
||
# Emitted Messages | ||
|
||
```block | ||
Checked 1 file in <TIME>. No fixes needed. | ||
``` |
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
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.