Closed luminoso closed 1 year ago
When running prettier-plugin-sort-json 3.0.0 with prettier 3.0.2, it removes newline at EOF.
Example: test.json: (notice the newline at EOF)
test.json
{ "name": "foobar" }
after running npx prettier -w test.json it edits the file to:
npx prettier -w test.json
Disabling the plugin prettier and re-running prettier, it restores the newline at EOFs.
Is this expected?
.prettierrc:
.prettierrc
{ "jsonRecursiveSort": true, "plugins": ["prettier-plugin-sort-json"] }
package.json:
package.json
{ "devDependencies": { "prettier": "^3.0.2", "prettier-plugin-sort-json": "^3.0.0" } }
Thanks for the report! No this isn't expected.
This should be fixed in v3.0.1. Let me know if that works!
When running prettier-plugin-sort-json 3.0.0 with prettier 3.0.2, it removes newline at EOF.
Example:
test.json
: (notice the newline at EOF)after running
npx prettier -w test.json
it edits the file to:Disabling the plugin prettier and re-running prettier, it restores the newline at EOFs.
Is this expected?
.prettierrc
:package.json
: