diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 0000000..1525982 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" diff --git a/package.json b/package.json index f539ee4..8076be6 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,8 @@ "build:quickapp-webview-huawei": "uni build -p quickapp-webview-huawei", "build:quickapp-webview-union": "uni build -p quickapp-webview-union", "type-check": "vue-tsc --noEmit", - "openapi-ts-request": "openapi-ts" + "openapi-ts-request": "openapi-ts", + "prepare": "husky" }, "lint-staged": { "**/*.{html,vue,ts,cjs,json,md}": [ @@ -134,6 +135,7 @@ "@vue/runtime-core": "^3.4.21", "@vue/tsconfig": "^0.1.3", "autoprefixer": "^10.4.20", + "husky": "^9.1.7", "lint-staged": "^15.2.10", "openapi-ts-request": "^1.1.2", "oxlint": "^0.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 99811ab..d2aebfa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -159,6 +159,9 @@ importers: autoprefixer: specifier: ^10.4.20 version: 10.4.20(postcss@8.4.49) + husky: + specifier: ^9.1.7 + version: 9.1.7 lint-staged: specifier: ^15.2.10 version: 15.2.10 @@ -3391,6 +3394,11 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} + husky@9.1.7: + resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==} + engines: {node: '>=18'} + hasBin: true + iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} @@ -9630,6 +9638,8 @@ snapshots: human-signals@5.0.0: {} + husky@9.1.7: {} + iconv-lite@0.4.24: dependencies: safer-buffer: 2.1.2