Skip to content

Commit e1ade82

Browse files
committed
refactor(husky): added husky scripts
1 parent da41d69 commit e1ade82

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.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+
npm test

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"npm": ">=6.13"
1111
},
1212
"scripts": {
13+
"test": "npm-run-all test:unit",
1314
"pretest": "npm-run-all pretty:quick lint:staged",
1415
"eslint:fix": "./node_modules/.bin/eslint . --ignore-path ./.eslintignore --fix",
1516
"pretty:quick": "./node_modules/.bin/pretty-quick --staged",
@@ -24,7 +25,8 @@
2425
"github-changes": "github-changes -o wwayne -r react-tooltip -a --only-pulls --use-commit-body",
2526
"copy:types": "cpy ./react-tooltip.d.ts ./dist --parents --dot",
2627
"cm": "git cz",
27-
"semantic-release": "semantic-release"
28+
"semantic-release": "semantic-release",
29+
"prepare": "husky install"
2830
},
2931
"config": {
3032
"commitizen": {
@@ -108,7 +110,7 @@
108110
"gh-pages": "4.0.0",
109111
"github-changes": "^2.0.3",
110112
"http-server": "^14.1.1",
111-
"husky": "^8.0.1",
113+
"husky": "^8.0.0",
112114
"ignore-styles": "5.0.1",
113115
"jsdom": "^20.0.0",
114116
"lint-staged": "^13.0.3",

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6045,7 +6045,7 @@ humanize-ms@^1.2.1:
60456045
dependencies:
60466046
ms "^2.0.0"
60476047

6048-
husky@^8.0.1:
6048+
husky@^8.0.0:
60496049
version "8.0.1"
60506050
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.1.tgz#511cb3e57de3e3190514ae49ed50f6bc3f50b3e9"
60516051
integrity sha512-xs7/chUH/CKdOCs7Zy0Aev9e/dKOMZf3K1Az1nar3tzlv0jfqnYtu235bstsWTmXOR0EfINrPa97yy4Lz6RiKw==

0 commit comments

Comments
 (0)