Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 7b76e02

Browse files
committed
chore(tooling): update husky workflow
1 parent 61ef82f commit 7b76e02

File tree

3 files changed

+195
-19
lines changed

3 files changed

+195
-19
lines changed

.huskyrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"hooks": {
3+
"pre-commit": "pretty-quick --staged && npm run lint:staged",
4+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
5+
}
6+
}

package.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"prod": "cross-env GOAL=production run-p server lint:watch",
88
"local": "cross-env NODE_ENV=local GOAL=local node server",
99
"lint": "eslint --fix pages/**/*.js components/**/* containers/**/* stores/**/*",
10-
"lint:watch": "esw -w pages/**/*.js components/**/* containers/**/* stores/**/*",
10+
"lint:staged": "git diff --cached --name-only --diff-filter=ACRM | grep \".js$\" | xargs ./node_modules/.bin/eslint",
1111
"server": "npm run clean && node server.js",
1212
"build": "run-s dist clean",
1313
"build:clean": "run-s dist clean",
@@ -43,11 +43,6 @@
4343
"path": "./node_modules/cz-conventional-changelog"
4444
}
4545
},
46-
"husky": {
47-
"hooks": {
48-
"commit-msg": "npm run commitmsg"
49-
}
50-
},
5146
"dependencies": {
5247
"accepts": "^1.3.4",
5348
"antd": "3.8.4",
@@ -150,12 +145,13 @@
150145
"eslint-plugin-react": "7.11.0",
151146
"eslint-plugin-react-hooks": "^1.6.0",
152147
"eslint-watch": "4.0.2",
153-
"husky": "^0.14.3",
148+
"husky": "2.1.0",
154149
"jest": "23.4.2",
155150
"lint-staged": "7.2.0",
156151
"npm-run-all": "^4.1.1",
157152
"plop": "2.0.0",
158153
"prettier": "1.14.0",
154+
"pretty-quick": "^1.11.0",
159155
"react-test-renderer": "16.4.2",
160156
"regenerator-runtime": "^0.13.1",
161157
"shelljs": "0.8.2",

0 commit comments

Comments
 (0)