Skip to content

Commit 712053d

Browse files
committed
scripts: husky
1 parent adf0461 commit 712053d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx pretty-quick --staged

package.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
4343
"pretty-quick": "pretty-quick",
4444
"test": "jest",
45-
"coverage": "jest --coverage"
45+
"coverage": "jest --coverage",
46+
"prepare": "husky install"
4647
},
4748
"dependencies": {
4849
"@babel/runtime": "^7.11.1",
@@ -58,16 +59,16 @@
5859
"@types/jest": "^29.2.4",
5960
"@types/react": "^17.0.13",
6061
"@types/react-dom": "^16.9.0",
61-
"@umijs/test": "^4.0.36",
6262
"@umijs/fabric": "^3.0.0",
63+
"@umijs/test": "^4.0.36",
6364
"coveralls": "^3.0.6",
6465
"cross-env": "^7.0.3",
6566
"cssstyle": "^2.3.0",
6667
"dumi": "^2.1.2",
6768
"eslint": "^7.0.0",
6869
"father": "^4.1.1",
6970
"gh-pages": "^3.1.0",
70-
"husky": "^8.0.2",
71+
"husky": "^8.0.0",
7172
"jest": "^29.3.1",
7273
"jest-environment-jsdom": "^29.3.1",
7374
"less": "^3.10.3",
@@ -83,11 +84,6 @@
8384
"react": ">=16.0.0",
8485
"react-dom": ">=16.0.0"
8586
},
86-
"husky": {
87-
"hooks": {
88-
"pre-commit": "pretty-quick --staged"
89-
}
90-
},
9187
"cnpm": {
9288
"mode": "npm"
9389
},

0 commit comments

Comments
 (0)