-
-
Notifications
You must be signed in to change notification settings - Fork 500
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(project): correctly ignore folders
- Loading branch information
Showing
9 changed files
with
234 additions
and
16 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
80 changes: 80 additions & 0 deletions
80
...ommands_check/should_show_diagnostics_for_linter_ignored_file_when_folder_is_ignored.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,80 @@ | ||
--- | ||
source: crates/biome_cli/tests/snap_test.rs | ||
expression: content | ||
--- | ||
## `biome.json` | ||
|
||
```json | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.6.1/schema.json", | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"ignore": ["**/build"], | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## `build/file.js` | ||
|
||
```js | ||
|
||
value['optimizelyService'] = optimizelyService; | ||
|
||
``` | ||
|
||
# Termination Message | ||
|
||
```block | ||
check ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× Some errors were emitted while running checks. | ||
``` | ||
|
||
# Emitted Messages | ||
|
||
```block | ||
build/file.js:2:8 lint/complexity/useLiteralKeys FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× The computed expression can be simplified without the use of a string literal. | ||
> 2 │ value['optimizelyService'] = optimizelyService; | ||
│ ^^^^^^^^^^^^^^^^^^^ | ||
3 │ | ||
i Unsafe fix: Use a literal key instead. | ||
1 1 │ | ||
2 │ - → value['optimizelyService']·=·optimizelyService; | ||
2 │ + → value.optimizelyService·=·optimizelyService; | ||
3 3 │ | ||
``` | ||
|
||
```block | ||
build/file.js format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
i Formatter would have printed the following content: | ||
1 │ - | ||
2 │ - → value['optimizelyService']·=·optimizelyService; | ||
3 │ - → → | ||
1 │ + value["optimizelyService"]·=·optimizelyService; | ||
2 │ + | ||
``` | ||
|
||
```block | ||
Checked 1 file in <TIME>. No fixes needed. | ||
Found 4 errors. | ||
``` |
34 changes: 34 additions & 0 deletions
34
...tests/snapshots/main_commands_format/should_fix_file_ignored_by_linter_inside_folder.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,34 @@ | ||
--- | ||
source: crates/biome_cli/tests/snap_test.rs | ||
expression: content | ||
--- | ||
## `biome.json` | ||
|
||
```json | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.6.1/schema.json", | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"ignore": ["**/build"], | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true | ||
} | ||
} | ||
} | ||
``` | ||
|
||
## `build/file.js` | ||
|
||
```js | ||
value["optimizelyService"] = optimizelyService; | ||
|
||
``` | ||
|
||
# Emitted Messages | ||
|
||
```block | ||
Formatted 1 file in <TIME>. Fixed 1 file. | ||
``` |
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