Skip to content

chore: migrate to oxfmt#19200

Merged
logaretm merged 9 commits intodevelopfrom
awad/migrate-to-oxfmt
Feb 13, 2026
Merged

chore: migrate to oxfmt#19200
logaretm merged 9 commits intodevelopfrom
awad/migrate-to-oxfmt

Conversation

@logaretm
Copy link
Member

@logaretm logaretm commented Feb 5, 2026

This PR migrates our formatting tool from prettier to oxfmt which 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

Benchmark Prettier oxfmt Speedup
CI 45s 6.0s-7.0s ~5x-7.5×
Local M3 Pro 22s 1.22s-1.98s ~11×

closes #19223

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

Codecov Results 📊


Generated by Codecov Action

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

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.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 8,908 - 8,750 +2%
GET With Sentry 1,623 18% 1,591 +2%
GET With Sentry (error only) 6,050 68% 5,956 +2%
POST Baseline 1,134 - 1,155 -2%
POST With Sentry 582 51% 571 +2%
POST With Sentry (error only) 1,059 93% 1,036 +2%
MYSQL Baseline 3,197 - 3,207 -0%
MYSQL With Sentry 443 14% 463 -4%
MYSQL With Sentry (error only) 2,616 82% 2,577 +2%

View base workflow run

@logaretm logaretm force-pushed the awad/migrate-to-oxfmt branch from f9f27f0 to b2db955 Compare February 13, 2026 15:04
@logaretm logaretm marked this pull request as ready for review February 13, 2026 16:01
@logaretm logaretm requested a review from a team as a code owner February 13, 2026 16:01
Copilot AI review requested due to automatic review settings February 13, 2026 16:01
Copy link
Collaborator

@timfish timfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Particularly nice because our prettier version was so out of date!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:prettier to fix: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
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- `yarn lint` - Run ESLint and Prettier checks
- `yarn lint` - Run ESLint and Oxfmt checks

Copilot uses AI. Check for mistakes.
Comment on lines 1 to 8
/**
* 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/
*/
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
"dev-packages/**/*.html",
"dev-packages/**/*.hbs",
"packages/ember/**/*.hbs",
"packages/ember/**/*.html"
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"packages/ember/**/*.html"
"packages/ember/**/*.html",
"lerna.json"

Copilot uses AI. Check for mistakes.
Copy link
Member

@andreiborza andreiborza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, the fact that no formatting in packages changed is great.

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking care of this!

@logaretm logaretm merged commit 6fb1ee1 into develop Feb 13, 2026
232 checks passed
@logaretm logaretm deleted the awad/migrate-to-oxfmt branch February 13, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate from Prettier to oxfmt

4 participants