chore: 🛠️ migrate husky 4 to husky 5

This commit is contained in:
bubkoo
2021-02-24 17:50:08 +08:00
parent f0d68fe8dd
commit e9767d92bd
6 changed files with 19 additions and 9 deletions

1
.husky/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
_

4
.husky/commit-msg Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn commitlint --edit "$1"

4
.husky/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn lint-staged && lerna run --concurrency 1 --stream precommit

4
.husky/prepare-commit-msg Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn devmoji -e --lint

4
.husky/prepush Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
./scripts/pre-push-check

View File

@ -21,15 +21,8 @@
"clear": "lerna run clean && lerna clean -y",
"clean:modules": "rimraf node_modules",
"bootstrap": "lerna bootstrap && yarn build:dev",
"reboot": "run-s clear clean:modules bootstrap"
},
"husky": {
"hooks": {
"prepare-commit-msg": "devmoji -e --lint",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged && lerna run --concurrency 1 --stream precommit",
"prepush": "./scripts/pre-push-check"
}
"reboot": "run-s clear clean:modules bootstrap",
"postinstall": "husky install"
},
"lint-staged": {
"**/*.{js,jsx,tsx,ts,less,md,json}": [