chore: add husky

This commit is contained in:
GyDi 2021-12-25 17:04:55 +08:00
parent 4bf0c0d19a
commit afa56e916e
2 changed files with 14 additions and 1 deletions

4
.husky/pre-commit Normal file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn pretty-quick --staged

View File

@ -8,7 +8,8 @@
"web:dev": "vite",
"web:build": "tsc && vite build",
"web:serve": "vite preview",
"predev": "node scripts/pre-dev.mjs"
"predev": "node scripts/pre-dev.mjs",
"prepare": "husky install"
},
"dependencies": {
"@emotion/react": "^11.7.0",
@ -32,9 +33,17 @@
"@vitejs/plugin-react": "^1.1.1",
"adm-zip": "^0.5.9",
"fs-extra": "^10.0.0",
"husky": "^7.0.0",
"node-fetch": "^3.1.0",
"pretty-quick": "^3.1.3",
"sass": "^1.44.0",
"typescript": "^4.5.2",
"vite": "^2.7.1"
},
"prettier": {
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"endOfLine": "lf"
}
}