-
-
Notifications
You must be signed in to change notification settings - Fork 832
Labels
A-formatter-prettier-diffArea - Formatter difference with PrettierArea - Formatter difference with Prettier
Description
Input
In package.json:
{
foo: "bar",
}Config
Oxfmt output
oxfmt version: 0.28.0
× Failed to sort package.json: /Users/brc-dd/foo/package.json
│ key must be a string at line 2 column 3
Error occurred when checking code style in the above files.It works for JSON files named other than package.json.
Oxfmt playground link
No response
Prettier output
prettier version: 3.8.1
{
"foo": "bar"
}Prettier playground link
No response
Additional notes
Run the binary directly using node_modules/.bin/oxfmt package.json; running pnpm oxfmt package.json won't work.
Although these malformed package.json files won't typically exist when running oxfmt from the CLI, extra trailing commas or unquoted values are quite common while editing them in an IDE and prettier's extension formats them correctly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-formatter-prettier-diffArea - Formatter difference with PrettierArea - Formatter difference with Prettier
{}