-
-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: migrate prettier auto endofline to LF as it's the default (#2145)
Co-authored-by: Ze-Zheng Wu <[email protected]>
- Loading branch information
Showing
5 changed files
with
102 additions
and
1 deletion.
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
60 changes: 60 additions & 0 deletions
60
crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_end_of_line.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,60 @@ | ||
--- | ||
source: crates/biome_cli/tests/snap_test.rs | ||
expression: content | ||
--- | ||
## `biome.json` | ||
|
||
```json | ||
{} | ||
``` | ||
|
||
## `.prettierrc` | ||
|
||
```prettierrc | ||
{ "endOfLine": "auto" } | ||
``` | ||
|
||
# Emitted Messages | ||
|
||
```block | ||
Prettier's `"endOfLine": "auto"` option is not supported in Biome. The default `"lf"` option is used instead. | ||
``` | ||
|
||
```block | ||
biome.json migrate ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
i Configuration file can be updated. | ||
1 │ - {} | ||
1 │ + { | ||
2 │ + → "formatter":·{ | ||
3 │ + → → "enabled":·true, | ||
4 │ + → → "formatWithErrors":·false, | ||
5 │ + → → "indentStyle":·"space", | ||
6 │ + → → "indentWidth":·2, | ||
7 │ + → → "lineEnding":·"lf", | ||
8 │ + → → "lineWidth":·80, | ||
9 │ + → → "attributePosition":·"auto" | ||
10 │ + → }, | ||
11 │ + → "javascript":·{ | ||
12 │ + → → "formatter":·{ | ||
13 │ + → → → "jsxQuoteStyle":·"double", | ||
14 │ + → → → "quoteProperties":·"asNeeded", | ||
15 │ + → → → "trailingComma":·"all", | ||
16 │ + → → → "semicolons":·"asNeeded", | ||
17 │ + → → → "arrowParentheses":·"always", | ||
18 │ + → → → "bracketSpacing":·true, | ||
19 │ + → → → "bracketSameLine":·false, | ||
20 │ + → → → "quoteStyle":·"single", | ||
21 │ + → → → "attributePosition":·"auto" | ||
22 │ + → → } | ||
23 │ + → } | ||
24 │ + } | ||
25 │ + | ||
``` | ||
|
||
```block | ||
Run the command with the option --write to apply the changes. | ||
``` |
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