From 0b11c60e7cc5f019354ff4f19b2e03601425e2b8 Mon Sep 17 00:00:00 2001 From: naokihaba <59875779+naokihaba@users.noreply.github.com> Date: Sun, 21 Jun 2026 21:13:17 +0900 Subject: [PATCH 1/2] docs(migrate): clarify Git hook tool migration process and provide manual steps for unsupported tools --- docs/guide/migrate.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/guide/migrate.md b/docs/guide/migrate.md index d5dbc0282f..acbf13d5ea 100644 --- a/docs/guide/migrate.md +++ b/docs/guide/migrate.md @@ -166,6 +166,16 @@ export default defineConfig({ After migrating, remove lint-staged from your dependencies and delete any lint-staged config files. See the [Commit hooks guide](/guide/commit-hooks) and [Staged config reference](/config/staged) for details. +### Git hook tools + +The `vp migrate` command can set up Vite+ commit hooks for you, but it doesn't automatically migrate every type of Git hook tool. This automatic migration path is specifically designed to handle Husky and lint-staged-style setups. + +If your project currently uses `lefthook`, `simple-git-hooks`, or `yorkie`, `vp migrate` will leave your existing configuration alone and show a warning. This happens even if you choose to set up hooks during the prompt or include the `--hooks` flag. + +If you want to move one of those tools over to Vite+ manually, you can follow these steps. First, move your staged-file commands into the `staged` block within `vite.config.ts`. Then, update your lifecycle script so it runs `vp config`. You will also need to create a Vite+ hook at `.vite-hooks/pre-commit` that runs `vp staged`. Finally, once you have confirmed that the Vite+ hook is working as expected, you can remove the old tool's configuration and dependency. + +You can find more details about the full Vite+ hook setup in the [Commit hooks guide](/guide/commit-hooks). + ## Examples ```bash From a3ff487d5e5a12c8f2b32b1637fa701ecdc67c9b Mon Sep 17 00:00:00 2001 From: naokihaba <59875779+naokihaba@users.noreply.github.com> Date: Sun, 21 Jun 2026 21:39:25 +0900 Subject: [PATCH 2/2] docs(migrate): clarify automatic migration support for Husky v9+ in vp migrate command --- docs/guide/migrate.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/migrate.md b/docs/guide/migrate.md index acbf13d5ea..c5472a25c8 100644 --- a/docs/guide/migrate.md +++ b/docs/guide/migrate.md @@ -168,7 +168,7 @@ After migrating, remove lint-staged from your dependencies and delete any lint-s ### Git hook tools -The `vp migrate` command can set up Vite+ commit hooks for you, but it doesn't automatically migrate every type of Git hook tool. This automatic migration path is specifically designed to handle Husky and lint-staged-style setups. +The `vp migrate` command can set up Vite+ commit hooks for you, but it doesn't automatically migrate every type of Git hook tool. This automatic migration path is specifically designed to handle Husky v9+ and lint-staged-style setups. Projects using Husky versions older than 9.0.0 are skipped and should upgrade to Husky v9 before using the automatic migration path. If your project currently uses `lefthook`, `simple-git-hooks`, or `yorkie`, `vp migrate` will leave your existing configuration alone and show a warning. This happens even if you choose to set up hooks during the prompt or include the `--hooks` flag.