Repository navigation
chore: format with oxfmt instead of Prettier - #1712
Open
ssalbdivad wants to merge 1 commit into
Open
ssalbdivad wants to merge 1 commit into
ssalbdivad wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Swaps Prettier for
@ark/oxfmt, a fork of oxfmt (oxc's Rust port of Prettier) that adds Prettier'sexperimentalTernariesoption, 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 upstreamoxfmtonce 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 ... extendsheritage clauses. Formatting the repo takes ~3s..oxfmtrc.jsoncarries the old Prettier options plusprintWidth: 80(oxfmt defaults to 100) and ignorespnpm-lock.yamlin place ofark/repo/.prettierignoreformat/checkFormat(wascheckPrettier) run oxfmtformatCmd, since the root no longer depends on prettier@ark/oxfmtis exempt fromminimumReleaseAgeso fork releases install immediatelydate.ts:@ts-ignore cast variancemoves onto theout tparameter, since the new heritage layout put it on its own lineNo binary yet for linux-arm64, musl, Intel macOS or Windows arm64.