-
-
Notifications
You must be signed in to change notification settings - Fork 68
docs: Add a docs page for migrating from Prettier to oxfmt. #676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for oxc-project ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Slightly updated:
|
The 7-steps felt too long and likely to lower CVR for me 🙈, so just resolved this by removing them. |
Co-authored-by: Connor Shea <connor.james.shea@gmail.com> Signed-off-by: Yuji Sugiura <6259812+leaysgur@users.noreply.github.com>
Co-authored-by: Connor Shea <connor.james.shea@gmail.com> Signed-off-by: Yuji Sugiura <6259812+leaysgur@users.noreply.github.com>
| Other important considerations when migrating from Prettier to Oxfmt: | ||
|
|
||
| - Oxfmt's formatting output is closest to Prettier v3.7. If you are using an older version of Prettier, you will see more differences in formatting output. | ||
| - Oxfmt aims to be mostly compatible with Prettier out-of-the-box, but there may still be some minor differences in formatting output in edge-cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could maybe remove this line, since it's already fully compatible with Prettier in JS/TS/JSX in my experience testing it on a few large codebases (bluesky's codebase has 0 differences between Prettier 3.7 and oxfmt as of today's release).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think basic flow is fine! 😉
However, I'd like to simplify and shorten the text overall. Some sentences might even be okay to omit entirely.
Would you mind giving it a try?
The editor integration feels like it could easily fill a whole page on its own... 😅
Let's split it into separate page later and just include a link here for now.
Maybe we can replace the caveats section with a link to the FAQ? We should probably add a few of these caveats to the FAQ as well anyway. I think most of the rest of the page is necessary to avoid users running into problems with the migration process (plus I assume a lot of people will use Claude or Copilot to migrate their projects, so giving it as much info as we can is useful for that). I'll take a swing at updating the text tomorrow.
So cut the editor part down to just a link to the editor question in the FAQ? That sounds good to me 👍 |
|
Thank you in advance! 🙌🏻
Yes, if necessary, update that section and/or split out the |
| ```diff | ||
| { | ||
| - "editor.defaultFormatter": "esbenp.prettier-vscode" | ||
| + "editor.defaultFormatter": "oxc.oxc-vscode" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since oxfmt doesn't yet support non-JS files, it's not practical to replace the prettier extension entirely with it. I think it's better to suggest enabling it for specific languages (for now, [javascript], [javascriptreact], [typescript], and [typescriptreact]).
And we still need "oxc.fmt.experimental": true, at the moment, if I'm not mistaken.
Made a few minor tweaks to the gist I wrote, still need to fill out the page to address a few TODOs
TODO: