Uh oh!
There was an error while loading. Please reload this page.
feat(migrate): Prettier → Oxfmt migration via vp fmt --migrate=prettier - #742
Merged
Conversation
✅ Deploy Preview for viteplus-staging ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
MemberAuthor
This stack of pull requests is managed by Graphite. Learn more about stacking. |
fengmk2force-pushed
the
prettier-migrate
branch
2 times, most recently
from
March 9, 2026 13:58
ba4a067 to
9297fc5Comparefengmk2force-pushed
the
prettier-migrate
branch
2 times, most recently
from
March 9, 2026 14:29
98e8aa0 to
fc66d6dComparefengmk2force-pushed
the
prettier-migrate
branch
4 times, most recently
from
March 9, 2026 15:51
5e41e14 to
71501d6Comparefengmk2
marked this pull request as ready for review
March 9, 2026 15:53
fengmk2force-pushed
the
prettier-migrate
branch
2 times, most recently
from
March 9, 2026 16:28
76ebad7 to
a3b339cComparefengmk2force-pushed
the
prettier-migrate
branch
2 times, most recently
from
March 9, 2026 17:20
53095a1 to
62bbc40Comparefengmk2
commented
Mar 9, 2026
Uh oh!
There was an error while loading. Please reload this page.
cpojer
approved these changes
Mar 10, 2026
MemberAuthor
Merge activity
|
Add Prettier → Oxfmt migration support to `vp migrate`, following the same architecture as the existing ESLint → Oxlint migration: Rust shell script rewriter → NAPI binding → TypeScript orchestration. - Rust rewriter rewrites `prettier` → `vp fmt`, strips Prettier-only flags (--write, --cache, --single-quote, --config, --plugin, etc.), and converts --list-different/-l → --check - Detects all Prettier config files (.prettierrc*, prettier.config.*, package.json#prettier) and .prettierignore - Removes prettier + prettier-plugin-* dependencies - Rewrites scripts in package.json and lint-staged configs - Supports both fresh migration and re-migration (already-vite-plus) - Includes snap test fixtures for basic, rerun, lint-staged, and eslint+prettier combo scenarios
…gration
When Prettier config lives in package.json ("prettier" key) rather than a
standalone file, extract it to a temporary .prettierrc.json so that
`vp fmt --migrate=prettier` can read and convert it to .oxfmtrc.json.
Previously the settings were lost because the migration step was skipped
but deletePrettierConfigFiles still removed pkg.prettier.…prettier rewrite - Remove --ignore-path from PRETTIER_ONLY_VALUE_FLAGS since vp fmt supports this flag - Add --experimental-cli to PRETTIER_ONLY_BOOLEAN_FLAGS so it gets stripped (fixes vitepress E2E failure)
…rewrite module prettier.rs and eslint.rs had ~85-90% identical code for shell AST walking, command renaming, and flag stripping. Extract all shared logic into a new script_rewrite.rs with a ScriptRewriteConfig struct capturing tool-specific differences (command name, subcommand, flag lists, flag conversions).
…rewrite `prettier -c .` now correctly rewrites to `vp fmt --check .` and `prettier -w .` to `vp fmt .`.
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 freeto 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.

Add Prettier → Oxfmt migration support to
vp migrate, following thesame architecture as the existing ESLint → Oxlint migration: Rust shell
script rewriter → NAPI binding → TypeScript orchestration.
prettier→vp fmt, strips Prettier-onlyflags (--write, --cache, --single-quote, --config, --plugin, etc.),
and converts --list-different/-l → --check
package.json#prettier) and .prettierignore
eslint+prettier combo scenarios