Migrate from prettier to oxfmt#5986
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5986 +/- ##
=======================================
Coverage 85.34% 85.34%
=======================================
Files 318 318
Lines 31922 31922
Branches 8834 8834
=======================================
Hits 27244 27244
Misses 4246 4246
Partials 432 432 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Numbers from my machine: `yarn prettier-fix` before: 6.5 seconds `yarn fmt` after: 1.3 seconds `yarn lint-fix` is still slow (9 seconds), I think that's bottlenecked on eslint.
|
Hi there—have you tried biome.js? I've been using it in my projects, and I think it's actually pretty good. |
fatadel
left a comment
There was a problem hiding this comment.
Thanks for taking care of this! I've added just one nit (comment update), otherwise lgtm 👍🏻
| // profile. Copy one of the existing ones, make it a valid profile of the | ||
| // version that you need, modify it to your liking, and add a subtest to | ||
| // this test that loads and tests it. | ||
| // Also run `yarn prettier-json` to format the new input file. |
There was a problem hiding this comment.
Apparently, this line needs changing too.
| "endOfLine": "lf", | ||
| "printWidth": 80, | ||
| "sortPackageJson": false, | ||
| "ignorePatterns": [ |
There was a problem hiding this comment.
Btw, we added profiler-cli/dist to the prettierignore while adding the profiler cli. We should add it here too.
| // Prettier config must be placed here to disable formatting rules from the | ||
| // base configs above, while allowing our custom rules below to take | ||
| // precedence. | ||
| prettierConfig, |
There was a problem hiding this comment.
eslint-config-prettier essentially disables a bunch of formatting rules that might clash with the prettier formatting. I wonder if we need something for oxfmt too, but I think it's fine if it didn't clash already after the migration.
Numbers from my machine:
yarn prettier-fixbefore: 6.5 secondsyarn fmtafter: 1.3 secondsyarn lint-fixis still slow (9 seconds), I think that's bottlenecked on eslint.