Skip to content

Commit defff26

Browse files
committed
fix: Setup husky correctly
1 parent 0475545 commit defff26

File tree

3 files changed

+135
-87
lines changed

3 files changed

+135
-87
lines changed

.husky/pre-commit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn lint-staged
4+
npx lint-staged
5+

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@
6363
"start:website": "webpack-dev-server --mode development --config webpack.website.ts",
6464
"preversion": "yarn run validate",
6565
"version": "git add -A package.json",
66-
"postinstall": "husky install",
67-
"prepublishOnly": "pinst --disable",
68-
"postpublish": "pinst --enable"
66+
"prepare": "husky install"
6967
},
7068
"main": "./lib/diff2html.js",
7169
"module": "./lib-esm/diff2html.js",
@@ -120,7 +118,6 @@
120118
"handlebars": "4.7.7",
121119
"handlebars-loader": "1.7.1",
122120
"html-webpack-plugin": "5.3.1",
123-
"husky": "^6.0.0",
124121
"image-webpack-loader": "7.0.1",
125122
"is-ci-cli": "2.2.0",
126123
"jest": "26.6.3",
@@ -129,7 +126,6 @@
129126
"mini-css-extract-plugin": "1.4.0",
130127
"mkdirp": "1.0.4",
131128
"nopt": "5.0.0",
132-
"pinst": "^2.1.4",
133129
"postcss": "8.2.9",
134130
"postcss-cli": "8.3.1",
135131
"postcss-import": "14.0.1",
@@ -143,7 +139,8 @@
143139
"url-loader": "4.1.1",
144140
"webpack": "5.30.0",
145141
"webpack-cli": "4.6.0",
146-
"whatwg-fetch": "3.6.2"
142+
"whatwg-fetch": "3.6.2",
143+
"husky": "^6.0.0"
147144
},
148145
"resolutions": {
149146
"lodash": ">=4.17.20",

0 commit comments

Comments
 (0)