Skip to content

Commit 1683450

Browse files
Arthiefengmk2
authored andcommitted
chore: migrate from Husky to vp config for git hooks
- Replace Husky pre-commit hook with .vite-hooks/pre-commit - Move lint-staged config from package.json to vite.config.ts - Remove husky and lint-staged dependencies - 'vp config': Add Claude MCP server configuration for vite-plus - 'vp config': Update CLAUDE.md with Vite+ workflow documentation
1 parent 9065c53 commit 1683450

6 files changed

Lines changed: 6 additions & 25 deletions

File tree

.husky/pre-commit

Lines changed: 0 additions & 1 deletion
This file was deleted.

.vite-hooks/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vp staged

package.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"docs:dev": "pnpm -C docs dev",
2121
"docs:build": "pnpm -C docs build",
2222
"docs:update-trusted-stack-stats": "pnpm -C docs update-trusted-stack-stats",
23-
"prepare": "husky"
23+
"prepare": "vp config"
2424
},
2525
"devDependencies": {
2626
"@emnapi/core": "catalog:",
@@ -30,18 +30,12 @@
3030
"@types/node": "catalog:",
3131
"@typescript/native-preview": "catalog:",
3232
"@voidzero-dev/vite-plus-tools": "workspace:*",
33-
"husky": "catalog:",
34-
"lint-staged": "catalog:",
3533
"playwright": "catalog:",
3634
"typescript": "catalog:",
3735
"vite": "catalog:",
3836
"vite-plus": "workspace:*",
3937
"vitest": "catalog:"
4038
},
41-
"lint-staged": {
42-
"*.@(js|ts|tsx|md|yaml|yml)": "vp check --fix",
43-
"*.rs": "cargo fmt --"
44-
},
4539
"engines": {
4640
"node": ">=22.18.0"
4741
},

pnpm-lock.yaml

Lines changed: 0 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ catalog:
8686
fresh-import: ^0.2.1
8787
fs-extra: ^11.4.0
8888
glob: ^13.0.0
89-
husky: ^9.1.7
9089
jsonc-parser: ^3.3.1
9190
# Kept in lockstep with the bundled @tsdown/css by .github/scripts/upgrade-deps.ts
9291
lightningcss: ^1.33.0

vite.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { defineConfig } from 'vite-plus';
22

33
export default defineConfig({
4+
staged: {
5+
'*.@(js|ts|tsx|md|yaml|yml)': 'vp check --fix',
6+
'*.rs': 'cargo fmt --',
7+
},
48
lint: {
59
options: {
610
typeAware: true,

0 commit comments

Comments
 (0)