Skip to content
This repository was archived by the owner on Mar 28, 2022. It is now read-only.

Commit c36f5d5

Browse files
committed
chore: Update husky
1 parent 1c34654 commit c36f5d5

File tree

4 files changed

+45
-163
lines changed

4 files changed

+45
-163
lines changed

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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 lint-staged

package-lock.json

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

package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"lint": "eslint *.js test jest.config.js",
2727
"lint-staged": "lint-staged",
2828
"test": "jest",
29-
"test:unit": "npm run test"
29+
"test:unit": "npm run test",
30+
"prepare": "is-ci || husky install"
3031
},
3132
"devDependencies": {
3233
"@babel/preset-env": "7.13.12",
@@ -37,7 +38,8 @@
3738
"eslint": "7.23.0",
3839
"eslint-config-prettier": "6.15.0",
3940
"eslint-plugin-prettier": "3.3.1",
40-
"husky": "4.3.8",
41+
"husky": "6.0.0",
42+
"is-ci": "3.0.0",
4143
"jest": "26.6.3",
4244
"lint-staged": "10.5.4",
4345
"prettier": "2.2.1",
@@ -49,11 +51,6 @@
4951
"*.js": "eslint",
5052
"jest.config.js": "eslint"
5153
},
52-
"husky": {
53-
"hooks": {
54-
"pre-commit": "npm run lint-staged"
55-
}
56-
},
5754
"engines": {
5855
"node": "12.x || 14.x || 15.x || 16.x"
5956
}

0 commit comments

Comments
 (0)