Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/guide/commit-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,23 @@ export default defineConfig({
```

This is the default Vite+ approach and should replace separate `lint-staged` configuration in most projects. Because `vp staged` reads from `vite.config.ts`, your staged-file checks stay in the same place as your lint, format, test, build, and task-runner config.

## Removing commit hooks

To fully remove Vite+ commit hooks, undo each thing `vp config` set up:

1. Unset the Git hooks path that points at the Vite+ dispatcher:

```bash
git config --unset core.hooksPath
```

2. Remove the hooks directory (use your `--hooks-dir` value if you changed it):

```bash
rm -rf .vite-hooks
```

3. Remove `vp config` from the `prepare` script in `package.json`. Otherwise the next install re-runs `vp config` and reinstalls the hooks.

4. Remove the `staged` block from `vite.config.ts` if it exists
Loading