diff --git a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate.snap b/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate.snap deleted file mode 100644 index fafe499a33dd..000000000000 --- a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate.snap +++ /dev/null @@ -1,59 +0,0 @@ ---- -source: crates/biome_cli/tests/snap_test.rs -expression: content ---- -## `biome.json` - -```json -{ "linter": { "enabled": true } } -``` - -## `.prettierrc` - -```prettierrc -{ "useTabs": false, "semi": true, "singleQuote": true } -``` - -# Emitted Messages - -```block -biome.json migrate ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - i Configuration file can be updated. - - 1 │ - {·"linter":·{·"enabled":·true·}·} - 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 │ + → "linter":·{·"enabled":·true·}, - 12 │ + → "javascript":·{ - 13 │ + → → "formatter":·{ - 14 │ + → → → "jsxQuoteStyle":·"double", - 15 │ + → → → "quoteProperties":·"asNeeded", - 16 │ + → → → "trailingCommas":·"all", - 17 │ + → → → "semicolons":·"always", - 18 │ + → → → "arrowParentheses":·"always", - 19 │ + → → → "bracketSpacing":·true, - 20 │ + → → → "bracketSameLine":·false, - 21 │ + → → → "quoteStyle":·"single", - 22 │ + → → → "attributePosition":·"auto" - 23 │ + → → } - 24 │ + → } - 25 │ + } - 26 │ + - - -``` - -```block -Run the command with the option --write to apply the changes. -``` - - diff --git a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_end_of_line.snap b/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_end_of_line.snap deleted file mode 100644 index 670ceff5b48a..000000000000 --- a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_end_of_line.snap +++ /dev/null @@ -1,60 +0,0 @@ ---- -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 │ + → → → "trailingCommas":·"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. -``` diff --git a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_jsonc.snap b/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_jsonc.snap deleted file mode 100644 index db671eec3aa5..000000000000 --- a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_jsonc.snap +++ /dev/null @@ -1,59 +0,0 @@ ---- -source: crates/biome_cli/tests/snap_test.rs -expression: content ---- -## `biome.jsonc` - -```json -{ "linter": { "enabled": true } } -``` - -## `.prettierrc` - -```prettierrc -{ "useTabs": false, "semi": true, "singleQuote": true } -``` - -# Emitted Messages - -```block -biome.jsonc migrate ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - i Configuration file can be updated. - - 1 │ - {·"linter":·{·"enabled":·true·}·} - 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 │ + → "linter":·{·"enabled":·true·}, - 12 │ + → "javascript":·{ - 13 │ + → → "formatter":·{ - 14 │ + → → → "jsxQuoteStyle":·"double", - 15 │ + → → → "quoteProperties":·"asNeeded", - 16 │ + → → → "trailingCommas":·"all", - 17 │ + → → → "semicolons":·"always", - 18 │ + → → → "arrowParentheses":·"always", - 19 │ + → → → "bracketSpacing":·true, - 20 │ + → → → "bracketSameLine":·false, - 21 │ + → → → "quoteStyle":·"single", - 22 │ + → → → "attributePosition":·"auto" - 23 │ + → → } - 24 │ + → } - 25 │ + } - 26 │ + - - -``` - -```block -Run the command with the option --write to apply the changes. -``` - - diff --git a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_no_file.snap b/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_no_file.snap deleted file mode 100644 index 7db630b47423..000000000000 --- a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_no_file.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: crates/biome_cli/tests/snap_test.rs -expression: content ---- -## `biome.json` - -```json -{ "linter": { "enabled": true } } -``` - -# Termination Message - -```block -migrate ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - × Migration has encountered an error: Biome couldn't find a Prettier configuration file. - - - -``` - - diff --git a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_with_ignore.snap b/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_with_ignore.snap deleted file mode 100644 index e29f17a8ea27..000000000000 --- a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_with_ignore.snap +++ /dev/null @@ -1,73 +0,0 @@ ---- -source: crates/biome_cli/tests/snap_test.rs -expression: content ---- -## `biome.json` - -```json -{ "linter": { "enabled": true } } -``` - -## `.prettierignore` - -```prettierignore - -dist/** - -node_modules/** - -# I am a comment -generated/*.spec.js - -``` - -## `.prettierrc` - -```prettierrc -{ "useTabs": false, "semi": true, "singleQuote": true } -``` - -# Emitted Messages - -```block -biome.json migrate ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - i Configuration file can be updated. - - 1 │ - {·"linter":·{·"enabled":·true·}·} - 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 │ + → → "ignore":·["dist/**",·"node_modules/**",·"generated/*.spec.js"] - 11 │ + → }, - 12 │ + → "linter":·{·"enabled":·true·}, - 13 │ + → "javascript":·{ - 14 │ + → → "formatter":·{ - 15 │ + → → → "jsxQuoteStyle":·"double", - 16 │ + → → → "quoteProperties":·"asNeeded", - 17 │ + → → → "trailingCommas":·"all", - 18 │ + → → → "semicolons":·"always", - 19 │ + → → → "arrowParentheses":·"always", - 20 │ + → → → "bracketSpacing":·true, - 21 │ + → → → "bracketSameLine":·false, - 22 │ + → → → "quoteStyle":·"single", - 23 │ + → → → "attributePosition":·"auto" - 24 │ + → → } - 25 │ + → } - 26 │ + } - 27 │ + - - -``` - -```block -Run the command with the option --write to apply the changes. -``` - - diff --git a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_write.snap b/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_write.snap deleted file mode 100644 index bad2027d4202..000000000000 --- a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_write.snap +++ /dev/null @@ -1,47 +0,0 @@ ---- -source: crates/biome_cli/tests/snap_test.rs -expression: content ---- -## `biome.json` - -```json -{ - "formatter": { - "enabled": true, - "formatWithErrors": false, - "indentStyle": "space", - "indentWidth": 2, - "lineEnding": "lf", - "lineWidth": 80, - "attributePosition": "auto" - }, - "linter": { "enabled": true }, - "javascript": { - "formatter": { - "jsxQuoteStyle": "double", - "quoteProperties": "asNeeded", - "trailingCommas": "all", - "semicolons": "always", - "arrowParentheses": "always", - "bracketSpacing": true, - "bracketSameLine": false, - "quoteStyle": "single", - "attributePosition": "auto" - } - } -} -``` - -## `.prettierrc` - -```prettierrc -{ "useTabs": false, "semi": true, "singleQuote": true } -``` - -# Emitted Messages - -```block -The configuration biome.json has been successfully migrated. -``` - - diff --git a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_write_biome_jsonc.snap b/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_write_biome_jsonc.snap deleted file mode 100644 index 9a407e8af50d..000000000000 --- a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_write_biome_jsonc.snap +++ /dev/null @@ -1,47 +0,0 @@ ---- -source: crates/biome_cli/tests/snap_test.rs -expression: content ---- -## `biome.jsonc` - -```json -{ - "formatter": { - "enabled": true, - "formatWithErrors": false, - "indentStyle": "space", - "indentWidth": 2, - "lineEnding": "lf", - "lineWidth": 80, - "attributePosition": "auto" - }, - "linter": { "enabled": true }, - "javascript": { - "formatter": { - "jsxQuoteStyle": "double", - "quoteProperties": "asNeeded", - "trailingCommas": "all", - "semicolons": "always", - "arrowParentheses": "always", - "bracketSpacing": true, - "bracketSameLine": false, - "quoteStyle": "single", - "attributePosition": "auto" - } - } -} -``` - -## `.prettierrc` - -```prettierrc -{ "useTabs": false, "semi": true, "singleQuote": true } -``` - -# Emitted Messages - -```block -The configuration biome.jsonc has been successfully migrated. -``` - - diff --git a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_write_with_ignore_file.snap b/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_write_with_ignore_file.snap deleted file mode 100644 index 44a4e9e82f55..000000000000 --- a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_write_with_ignore_file.snap +++ /dev/null @@ -1,65 +0,0 @@ ---- -source: crates/biome_cli/tests/snap_test.rs -expression: content ---- -## `biome.json` - -```json -{ - "formatter": { - "enabled": true, - "formatWithErrors": false, - "indentStyle": "space", - "indentWidth": 2, - "lineEnding": "lf", - "lineWidth": 80, - "attributePosition": "auto", - "ignore": ["dist/**", "node_modules/**", "generated/*.spec.js"] - }, - "linter": { "enabled": true }, - "javascript": { - "formatter": { - "jsxQuoteStyle": "double", - "quoteProperties": "asNeeded", - "trailingCommas": "all", - "semicolons": "always", - "arrowParentheses": "always", - "bracketSpacing": true, - "bracketSameLine": false, - "quoteStyle": "single", - "attributePosition": "auto" - } - } -} -``` - -## `.prettierignore` - -```prettierignore - -dist/** - -node_modules/** - -# I am a comment -generated/*.spec.js - -``` - -## `.prettierrc` - -```prettierrc -{ "useTabs": false, "semi": true, "singleQuote": true } -``` - -# Emitted Messages - -```block -The configuration biome.json has been successfully migrated. -``` - -```block -Please make sure that the globs of the .prettierignore file still work in Biome. Prettier's globs use git globs, while Biome's globs use uni-style globs. They both seem similar, but their semantics differ. -``` - - diff --git a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_yml_file.snap b/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_yml_file.snap deleted file mode 100644 index 0eeb5b5d3d74..000000000000 --- a/crates/biome_cli/tests/snapshots/main_commands_migrate/prettier_migrate_yml_file.snap +++ /dev/null @@ -1,76 +0,0 @@ ---- -source: crates/biome_cli/tests/snap_test.rs -expression: content ---- -## `biome.json` - -```json -{ "linter": { "enabled": true } } -``` - -## `.prettierrc` - -```prettierrc -useTabs: true -``` - -# Termination Message - -```block -migrate ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - × Migration has encountered an error: Could not deserialize the Prettier configuration file - - - -``` - -# Emitted Messages - -```block -.prettierrc:1:1 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - × String values must be double quoted. - - > 1 │ useTabs: true - │ ^^^^^^^ - - -``` - -```block -.prettierrc:1:8 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - × End of file expected - - > 1 │ useTabs: true - │ ^ - - i Use an array for a sequence of values: `[1, 2]` - - -``` - -```block -.prettierrc:1:10 parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - × End of file expected - - > 1 │ useTabs: true - │ ^^^^ - - i Use an array for a sequence of values: `[1, 2]` - - -``` - -```block -.prettierrc:1:1 deserialize ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - × Incorrect type, expected an object, but received an array. - - > 1 │ useTabs: true - │ ^^^^^^^^^^^^^ - - -```