Skip to content

Commit 2011a35

Browse files
chore: Bump Husky to v8
1 parent 7c950c0 commit 2011a35

File tree

5 files changed

+22
-185
lines changed

5 files changed

+22
-185
lines changed

.husky/commit-msg

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+
npm run 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+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx 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+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
exec < /dev/tty && node_modules/.bin/cz --hook || true

package-lock.json

Lines changed: 7 additions & 176 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"test:watch": "jest --watch",
3232
"quality": "npm run lint && npm run test",
3333
"commit": "git-cz",
34-
"commitlint": "commitlint --color --verbose"
34+
"commitlint": "commitlint --color --verbose",
35+
"prepare": "husky install"
3536
},
3637
"devDependencies": {
3738
"@babel/core": "^7.23.3",
@@ -58,7 +59,7 @@
5859
"eslint-plugin-compat": "^4.2.0",
5960
"eslint-plugin-prettier": "^5.0.1",
6061
"eslint-plugin-react": "^7.33.2",
61-
"husky": "^4.3.8",
62+
"husky": "^8.0.0",
6263
"inquirer": "^8.2.6",
6364
"jest": "^29.7.0",
6465
"jest-environment-jsdom": "^29.7.0",
@@ -79,13 +80,6 @@
7980
"path": "@commitlint/cz-commitlint"
8081
}
8182
},
82-
"husky": {
83-
"hooks": {
84-
"prepare-commit-msg": "exec < /dev/tty && node_modules/.bin/cz --hook || true",
85-
"commit-msg": "npm run commitlint -- --edit $1",
86-
"pre-commit": "lint-staged"
87-
}
88-
},
8983
"lint-staged": {
9084
"src/**/*.{js,jsx,ts,tsx}": [
9185
"npm run lint:fix"

0 commit comments

Comments
 (0)