Skip to content

Commit 280fdcd

Browse files
authored
build(deps-dev): upgrade husky and lint-staged (#446)
* build(deps-dev): upgrade husky to v7 * build(deps-dev): skip husky on CI * build(deps-dev): bump lint-staged * refactor: remove --no-install flag from husky hooks
1 parent a0cd8b1 commit 280fdcd

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

.husky/commit-msg

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
# Skip commit-msg hook on CI
5+
[ -n "$CI" ] && exit 0
6+
7+
npx commitlint --edit $1

.husky/pre-commit

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
# Skip pre-commit hook on CI
5+
[ -n "$CI" ] && exit 0
6+
7+
npx lint-staged

.huskyrc

-6
This file was deleted.

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
"test:update": "npm run test -- --u",
3939
"test:watch": "npm run test -- --watch",
4040
"type-check": "tsc --noEmit",
41-
"semantic-release": "semantic-release"
41+
"semantic-release": "semantic-release",
42+
"prepare": "husky install"
4243
},
4344
"dependencies": {
4445
"@typescript-eslint/experimental-utils": "^4.24.0"
@@ -60,9 +61,9 @@
6061
"eslint-plugin-node": "^11.1.0",
6162
"eslint-plugin-prettier": "^3.4.0",
6263
"eslint-plugin-promise": "^5.1.0",
63-
"husky": "^4.3.8",
64+
"husky": "^7.0.0",
6465
"jest": "^27.0.4",
65-
"lint-staged": "^10.5.4",
66+
"lint-staged": "^11.1.1",
6667
"prettier": "2.3.2",
6768
"semantic-release": "^17.4.3",
6869
"ts-jest": "^27.0.3",

0 commit comments

Comments
 (0)