Conversation
Codecov Results 📊Generated by Codecov Action |
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
2a7f522 to
f9f27f0
Compare
f9f27f0 to
b2db955
Compare
timfish
left a comment
There was a problem hiding this comment.
Particularly nice because our prettier version was so out of date!
There was a problem hiding this comment.
Pull request overview
This pull request migrates the codebase from Prettier to oxfmt for code formatting. Oxfmt is a Rust-based, Prettier-compatible formatter that's ~30x faster. The migration includes updating all formatting scripts, configuration files, tooling integrations (VSCode, GitHub workflows), and documentation to use oxfmt instead of Prettier.
Changes:
- Replaced Prettier with oxfmt (version 0.31.0) as the formatting tool
- Updated all npm scripts across the monorepo from
fix:prettier/lint:prettiertofix:oxfmt/lint:oxfmt - Migrated configuration from embedded package.json prettier config to .oxfmtrc.json with appropriate ignore patterns for HTML and Handlebars files
Reviewed changes
Copilot reviewed 33 out of 37 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Removed prettier and prettier-plugin-astro dependencies; added oxfmt; updated scripts and removed embedded prettier config |
| yarn.lock | Added oxfmt@0.31.0 with platform-specific bindings; removed prettier-plugin-astro and related dependencies |
| packages/replay-internal/package.json | Updated scripts to use oxfmt instead of prettier |
| .oxfmtrc.json | New oxfmt configuration file with formatting rules matching previous prettier settings and ignore patterns for problematic file types |
| .prettierignore | Removed (replaced by ignorePatterns in .oxfmtrc.json) |
| .vscode/settings.json | Updated default formatter from prettier-vscode to oxc-vscode |
| .vscode/extensions.json | Updated recommended extension from prettier-vscode to oxc-vscode |
| .github/workflows/build.yml | Updated formatting check command from lint:prettier to format:check |
| CLAUDE.md | Updated documentation to reference oxfmt and added new format:check/format commands |
| .cursor/rules/sdk_development.mdc | Added format:check and format commands documentation |
| .editorconfig | Minor whitespace formatting fix |
| packages/sveltekit/test/server-common/serverRoute.test.ts | Removed redundant "type" keyword from type import |
| Multiple Angular component files | Reformatted inline templates to multi-line format |
| Multiple wrangler.jsonc files | Added trailing commas and reformatted indentation |
| Prisma migration lock files | Removed trailing newlines |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -34,6 +34,8 @@ You are working on the Sentry JavaScript SDK, a critical production SDK used by | |||
|
|
|||
| - `yarn lint` - Run ESLint and Prettier checks | |||
There was a problem hiding this comment.
The comment on this line still references "Prettier" but should be updated to "Oxfmt" to match the migration. The command now runs oxfmt checks instead of prettier checks.
| - `yarn lint` - Run ESLint and Prettier checks | |
| - `yarn lint` - Run ESLint and Oxfmt checks |
| /** | ||
| * For more details on how to configure Wrangler, refer to: | ||
| * https://developers.cloudflare.com/workers/wrangler/configuration/ | ||
| */ | ||
| /** | ||
| * For more details on how to configure Wrangler, refer to: | ||
| * https://developers.cloudflare.com/workers/wrangler/configuration/ | ||
| */ |
There was a problem hiding this comment.
The file header comment appears to be duplicated. Lines 1-4 and lines 5-8 contain identical comments. This is likely a formatting error introduced during the migration to oxfmt.
| "dev-packages/**/*.html", | ||
| "dev-packages/**/*.hbs", | ||
| "packages/ember/**/*.hbs", | ||
| "packages/ember/**/*.html" |
There was a problem hiding this comment.
The lerna.json file was explicitly excluded in the old .prettierignore but is not included in the new .oxfmtrc.json ignorePatterns. With the trailingComma configuration set to "all", oxfmt will want to format lerna.json (adding a trailing comma after "npmClient": "yarn"), which may cause formatting check failures. Consider adding "lerna.json" to the ignorePatterns array in .oxfmtrc.json to maintain the previous behavior.
| "packages/ember/**/*.html" | |
| "packages/ember/**/*.html", | |
| "lerna.json" |
andreiborza
left a comment
There was a problem hiding this comment.
Very nice, the fact that no formatting in packages changed is great.
Lms24
left a comment
There was a problem hiding this comment.
Thank you for taking care of this!
This PR migrates our formatting tool from
prettiertooxfmtwhich is part of the oxc toolchain and offers faster checking and format fixing speeds while maintaining the same coverage.I created a follow up PR in #19311 to unignore a few rules and fix the associated snapshot tests affected by it.
Benchmarks
closes #19223