This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 659
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
363 additions
and
48 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
37 changes: 37 additions & 0 deletions
37
crates/rome_cli/tests/snapshots/main_commands_format/format_jsonc_files.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,37 @@ | ||
--- | ||
source: crates/rome_cli/tests/snap_test.rs | ||
expression: content | ||
--- | ||
## `file.jsonc` | ||
|
||
```jsonc | ||
|
||
/*test*/ [ | ||
|
||
/* some other comment*/1, 2, 3] | ||
|
||
``` | ||
|
||
# Emitted Messages | ||
|
||
```block | ||
file.jsonc format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
i Formatter would have printed the following content: | ||
1 │ - | ||
2 │ - /*test*/·[ | ||
3 │ - | ||
4 │ - /*·some·other·comment*/1,·2,·3] | ||
5 │ - → | ||
1 │ + /*test*/·[/*·some·other·comment*/·1,·2,·3] | ||
2 │ + | ||
``` | ||
|
||
```block | ||
Compared 1 file(s) in <TIME> | ||
``` | ||
|
||
|
115 changes: 115 additions & 0 deletions
115
.../rome_cli/tests/snapshots/main_commands_format/treat_known_json_files_as_jsonc_files.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,115 @@ | ||
--- | ||
source: crates/rome_cli/tests/snap_test.rs | ||
expression: content | ||
--- | ||
## `files/.babelrc` | ||
|
||
```babelrc | ||
/*test*/ [ | ||
/* some other comment*/1, 2, 3] | ||
``` | ||
|
||
## `files/.eslintrc.json` | ||
|
||
```json | ||
|
||
/*test*/ [ | ||
|
||
/* some other comment*/1, 2, 3] | ||
|
||
``` | ||
|
||
## `files/.jshintrc` | ||
|
||
```jshintrc | ||
/*test*/ [ | ||
/* some other comment*/1, 2, 3] | ||
``` | ||
|
||
## `files/typescript.json` | ||
|
||
```json | ||
|
||
/*test*/ [ | ||
|
||
/* some other comment*/1, 2, 3] | ||
|
||
``` | ||
|
||
# Emitted Messages | ||
|
||
```block | ||
files/typescript.json format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
i Formatter would have printed the following content: | ||
1 │ - | ||
2 │ - /*test*/·[ | ||
3 │ - | ||
4 │ - /*·some·other·comment*/1,·2,·3] | ||
5 │ - → | ||
1 │ + /*test*/·[/*·some·other·comment*/·1,·2,·3] | ||
2 │ + | ||
``` | ||
|
||
```block | ||
files/.eslintrc.json format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
i Formatter would have printed the following content: | ||
1 │ - | ||
2 │ - /*test*/·[ | ||
3 │ - | ||
4 │ - /*·some·other·comment*/1,·2,·3] | ||
5 │ - → | ||
1 │ + /*test*/·[/*·some·other·comment*/·1,·2,·3] | ||
2 │ + | ||
``` | ||
|
||
```block | ||
files/.jshintrc format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
i Formatter would have printed the following content: | ||
1 │ - | ||
2 │ - /*test*/·[ | ||
3 │ - | ||
4 │ - /*·some·other·comment*/1,·2,·3] | ||
5 │ - → | ||
1 │ + /*test*/·[/*·some·other·comment*/·1,·2,·3] | ||
2 │ + | ||
``` | ||
|
||
```block | ||
files/.babelrc format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
i Formatter would have printed the following content: | ||
1 │ - | ||
2 │ - /*test*/·[ | ||
3 │ - | ||
4 │ - /*·some·other·comment*/1,·2,·3] | ||
5 │ - → | ||
1 │ + /*test*/·[/*·some·other·comment*/·1,·2,·3] | ||
2 │ + | ||
``` | ||
|
||
```block | ||
Compared 4 file(s) in <TIME> | ||
``` | ||
|
||
|
37 changes: 37 additions & 0 deletions
37
crates/rome_cli/tests/snapshots/main_commands_format/treats_typescript_json_like_jsonc.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,37 @@ | ||
--- | ||
source: crates/rome_cli/tests/snap_test.rs | ||
expression: content | ||
--- | ||
## `typescript.json` | ||
|
||
```json | ||
|
||
/*test*/ [ | ||
|
||
/* some other comment*/1, 2, 3] | ||
|
||
``` | ||
|
||
# Emitted Messages | ||
|
||
```block | ||
typescript.json format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
i Formatter would have printed the following content: | ||
1 │ - | ||
2 │ - /*test*/·[ | ||
3 │ - | ||
4 │ - /*·some·other·comment*/1,·2,·3] | ||
5 │ - → | ||
1 │ + /*test*/·[/*·some·other·comment*/·1,·2,·3] | ||
2 │ + | ||
``` | ||
|
||
```block | ||
Compared 1 file(s) in <TIME> | ||
``` | ||
|
||
|
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.