Skip to content

Commit b9b0af0

Browse files
committed
chore: migrate husky to its latest version
1 parent e709421 commit b9b0af0

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npm test
4+
npx --no-install lint-staged

.husky/prepare-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+
exec < /dev/tty && git cz --hook || true

package.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,6 @@
5656
"@commitlint/cli": "^12.0.1",
5757
"commitizen": "4.2.3"
5858
},
59-
"husky": {
60-
"hooks": {
61-
"pre-commit": "lint-staged",
62-
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true",
63-
"commit-msg": "commitLint -E HUSKY_GIT_PARAMS"
64-
}
65-
},
6659
"lint-staged": {
6760
"*.{css,json,md}": [
6861
"prettier --write",

0 commit comments

Comments
 (0)