Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Migrate the formatter to Oxfmt. The last blocker is
overridesconfig, which is already supported in oxc-project/oxc#18068 and released inoxfmt@0.25.0(the latest isoxfmt@0.26.0).Following the changes I made for migrating:
.prettierrc.jsonto.oxfmtrc.json.printWidth: 80(Oxfmt defaults to 100).experimentalSortPackageJson(Avoid large diffs; there are over 200 packages.json files in the codebase)..prettierignoreinto.oxfmtrc.json, which is now listed in theignorePatternsfield.Prettierword toOxfmtinCONTRIBUTING.mdDiffs:
netlify.tomldifferences are expected, asOxfmthas built-in support for TOML, which formats it like this.packages/create-vite/template-lit-ts/src/my-element.tsandpackages/create-vite/template-lit/src/my-element.jsare unexpected differences. I checked into Prettier, and there is no extra indent for the empty line. Maybe it is caused by the embedding formatting still being incomplete. See oxfmt: embedded formatting full support (aka xxx-in-js) oxc-project/oxc#15180Besides the above discrepancies, when I turned on
experimentalSortPackageJson, I received the following error.> oxfmt × Failed to sort package.json: /Users/qing/p/github/vite/playground/resolve/utf8-bom-package/package.json │ expected value at line 1 column 1But it is weird, as it works in the Oxc VSCode extension.
@leaysgur cc