-
-
Notifications
You must be signed in to change notification settings - Fork 524
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): raise an error when invalid config extension is passed (#4949
- Loading branch information
Showing
12 changed files
with
303 additions
and
136 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...older_contains_biomejson_and_biomejsonc_and_it_will_use_biomejson_by_default.md
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,5 @@ | ||
--- | ||
cli: patch | ||
--- | ||
|
||
# Biome logs a warning in case a folder contains `biome.json` and `biome.jsonc`, and it will use `biome.json` by default. |
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
52 changes: 52 additions & 0 deletions
52
...sts/snapshots/main_cases_config_path/raises_a_warning_for_double_configuration_found.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,52 @@ | ||
--- | ||
source: crates/biome_cli/tests/snap_test.rs | ||
expression: redactor(content) | ||
snapshot_kind: text | ||
--- | ||
## `biome.jsonc` | ||
|
||
```json | ||
{} | ||
``` | ||
|
||
## `file.js` | ||
|
||
```js | ||
function name() { return "lorem" } | ||
``` | ||
|
||
# Termination Message | ||
|
||
```block | ||
check ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× Some errors were emitted while running checks. | ||
``` | ||
|
||
# Emitted Messages | ||
|
||
```block | ||
Both biome.json and biome.jsonc files were found in the same folder. Biome will use the biome.json file. | ||
``` | ||
|
||
```block | ||
file.js format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× Formatter would have printed the following content: | ||
1 │ - function·name()·{·return·"lorem"·} | ||
1 │ + function·name()·{ | ||
2 │ + ········return·"lorem"; | ||
3 │ + } | ||
4 │ + | ||
``` | ||
|
||
```block | ||
Checked 1 file in <TIME>. No fixes applied. | ||
Found 1 error. | ||
``` |
21 changes: 21 additions & 0 deletions
21
...sts/snapshots/main_cases_config_path/raises_an_error_for_no_configuration_file_found.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,21 @@ | ||
--- | ||
source: crates/biome_cli/tests/snap_test.rs | ||
expression: redactor(content) | ||
snapshot_kind: text | ||
--- | ||
## `file.js` | ||
|
||
```js | ||
function name() { return "lorem" } | ||
``` | ||
|
||
# Termination Message | ||
|
||
```block | ||
config configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
× Biome couldn't find a configuration in the directory config. | ||
``` |
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
Oops, something went wrong.