fix husky upgrade

This commit is contained in:
chenxsan 2021-02-22 09:08:10 +08:00
parent 2f1a892ce4
commit d2c6b9f8ec
3 changed files with 6 additions and 5 deletions

1
.husky/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
_

4
.husky/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install lint-staged

View File

@ -146,6 +146,7 @@
"type-report": "rimraf coverage && yarn cover:types && yarn cover:report && open-cli coverage/lcov-report/index.html",
"pretest": "yarn lint",
"prelint": "yarn setup",
"postinstall": "husky install",
"lint": "yarn code-lint && yarn special-lint && yarn type-lint && yarn typings-lint && yarn yarn-lint && yarn pretty-lint && yarn spellcheck",
"code-lint": "eslint . --ext '.js' --cache",
"type-lint": "tsc",
@ -169,11 +170,6 @@
"cover:types": "node node_modules/tooling/type-coverage",
"cover:report": "istanbul report"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.js|{lib,setup,bin,hot,tooling,schemas}/**/*.js|test/*.js|{test,examples}/**/webpack.config.js}": [
"eslint --cache"