Skip to content

chore: format with oxfmt instead of Prettier - #1712

Open
ssalbdivad wants to merge 1 commit into
mainfrom
oxfmt
Open

ssalbdivad wants to merge 1 commit into
mainfrom
oxfmt

Conversation

@ssalbdivad

@ssalbdivad ssalbdivad commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Swaps Prettier for @ark/oxfmt, a fork of oxfmt (oxc's Rust port of Prettier) that adds Prettier's experimentalTernaries option, which stock oxfmt rejects. The fork is Boshen's unmerged oxc-project/oxc#26008 rebased onto current oxc plus two fixes, built from ssalbdivad/oxc@experimental-ternaries for linux-x64, darwin-arm64 and win32-x64. Swap back to upstream oxfmt once oxc-project/oxc#14914 ships.

Ternaries and conditional types format exactly as before. The other changed files are because oxfmt follows Prettier 3.7+, mostly moving interface ... extends heritage clauses. Formatting the repo takes ~3s.

  • .oxfmtrc.json carries the old Prettier options plus printWidth: 80 (oxfmt defaults to 100) and ignores pnpm-lock.yaml in place of ark/repo/.prettierignore
  • format / checkFormat (was checkPrettier) run oxfmt
  • attest snapshot updates are formatted with oxfmt via formatCmd, since the root no longer depends on prettier
  • VS Code uses the oxc extension pointed at the local binary
  • @ark/oxfmt is exempt from minimumReleaseAge so fork releases install immediately
  • date.ts: @ts-ignore cast variance moves onto the out t parameter, since the new heritage layout put it on its own line

No binary yet for linux-arm64, musl, Intel macOS or Windows arm64.

Swap Prettier for @ark/oxfmt, a fork of oxfmt (oxc's Rust port of
Prettier) that adds Prettier's experimentalTernaries option, which stock
oxfmt rejects. The fork is Boshen's unmerged oxc-project/oxc#26008 rebased
onto current oxc plus two fixes, built from ssalbdivad/oxc's
experimental-ternaries branch for linux-x64, darwin-arm64 and win32-x64.
Swap back to upstream `oxfmt` once oxc-project/oxc#14914 ships.

Ternaries and conditional types format exactly as before. The other 60
files change because oxfmt follows Prettier 3.7+, mostly by moving
`interface ... extends` heritage clauses. Formatting the repo takes ~3s.

- .oxfmtrc.json carries the old Prettier options plus printWidth 80
  (oxfmt defaults to 100) and ignores pnpm-lock.yaml in place of
  ark/repo/.prettierignore
- `format`/`checkFormat` (was `checkPrettier`) run oxfmt
- attest snapshot updates are formatted with oxfmt via formatCmd, since
  the root no longer depends on prettier
- VS Code uses the oxc extension pointed at the local binary
- @ark/oxfmt is exempt from minimumReleaseAge so fork releases install
  immediately
- date.ts: move `@ts-ignore cast variance` onto the `out t` parameter,
  since the new heritage layout put it on its own line

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To do

Development

Successfully merging this pull request may close these issues.

1 participant