Skip to content
This repository was archived by the owner on Feb 19, 2024. It is now read-only.

Commit 2baa976

Browse files
committed
style: update to husky v5
1 parent 6d4643a commit 2baa976

File tree

5 files changed

+76
-158
lines changed

5 files changed

+76
-158
lines changed

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.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 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+
npx lint-staged

package-lock.json

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

package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,13 @@
2828
"@commitlint/cli": "11.0.0",
2929
"@commitlint/config-angular": "11.0.0",
3030
"eslint": "7.19.0",
31-
"husky": "4.3.8",
31+
"husky": "^5.0.9",
3232
"lint-staged": "10.5.4",
33+
"pinst": "^2.1.4",
3334
"prettier": "2.2.1",
3435
"snyk": "1.446.0",
3536
"typescript": "4.1.3"
3637
},
37-
"husky": {
38-
"hooks": {
39-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
40-
"pre-commit": "lint-staged"
41-
}
42-
},
4338
"lint-staged": {
4439
"*.{yml,md,js,json}": [
4540
"prettier --write"
@@ -67,7 +62,10 @@
6762
"scripts": {
6863
"snyk-protect": "snyk protect",
6964
"prepare": "npm run snyk-protect",
70-
"test": "eslint --ext .js,.ts,.tsx *.js"
65+
"test": "eslint --ext .js,.ts,.tsx *.js",
66+
"postinstall": "husky install",
67+
"prepublishOnly": "pinst --disable",
68+
"postpublish": "pinst --enable"
7169
},
7270
"snyk": true
7371
}

0 commit comments

Comments
 (0)