Skip to content

Commit 7a086a6

Browse files
authored
chore: upgrades husky (#309)
1 parent 87cca3c commit 7a086a6

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run pre-commit

package.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
"contrib:add": "all-contributors add",
1515
"contrib:generate": "all-contributors generate",
1616
"lint-staged": "lint-staged",
17-
"docs": "lerna run docs"
17+
"docs": "lerna run docs",
18+
"prepare": "husky install",
19+
"pre-commit": "run-s lint-staged test"
1820
},
1921
"devDependencies": {
2022
"@commitlint/cli": "^8.1.0",
@@ -24,7 +26,7 @@
2426
"commitizen": "^3.1.1",
2527
"conventional-changelog-cli": "^2.1.0",
2628
"cz-conventional-changelog": "^2.1.0",
27-
"husky": "^3.0.0",
29+
"husky": "^7.0.0",
2830
"jest": "^26.2.2",
2931
"jest-express": "^1.10.1",
3032
"lerna": "^3.22.1",
@@ -35,12 +37,6 @@
3537
"ts-jest": "^26.0.0",
3638
"typescript": "^3.9.7"
3739
},
38-
"husky": {
39-
"hooks": {
40-
"pre-commit": "run-s lint-staged test",
41-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
42-
}
43-
},
4440
"lint-staged": {
4541
"*.{js,jsx,ts,tsx}": [
4642
"prettier --write",

0 commit comments

Comments
 (0)