chore: 添加husky

This commit is contained in:
2025-12-19 14:09:39 +08:00
parent f192180d22
commit dacc130293
3 changed files with 50 additions and 38 deletions

0
.husky/pre-commit Normal file
View File

View File

@ -7,7 +7,8 @@
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"prepare": "svelte-kit sync || echo '' && husky",
"prepare-husky": "husky",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "eslint . && prettier --check .",
@ -29,6 +30,7 @@
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-svelte": "^3.13.1",
"globals": "^16.5.0",
"husky": "^9.1.7",
"prettier": "^3.7.4",
"prettier-plugin-svelte": "^3.4.0",
"svelte": "^5.45.6",

10
pnpm-lock.yaml generated
View File

@ -38,6 +38,9 @@ importers:
globals:
specifier: ^16.5.0
version: 16.5.0
husky:
specifier: ^9.1.7
version: 9.1.7
prettier:
specifier: ^3.7.4
version: 3.7.4
@ -744,6 +747,11 @@ packages:
resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==}
engines: {node: '>=8'}
husky@9.1.7:
resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==}
engines: {node: '>=18'}
hasBin: true
ignore@5.3.2:
resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}
engines: {node: '>= 4'}
@ -1723,6 +1731,8 @@ snapshots:
has-flag@4.0.0: {}
husky@9.1.7: {}
ignore@5.3.2: {}
ignore@7.0.5: {}