chore: fix husky hooks
This commit is contained in:
parent
20e732a268
commit
8e3b27fb5b
4 changed files with 13 additions and 7 deletions
1
.husky/.gitignore
vendored
Normal file
1
.husky/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
_
|
4
.husky/commit-msg
Executable file
4
.husky/commit-msg
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
yarn commitlint -E HUSKY_GIT_PARAMS
|
4
.husky/pre-commit
Executable file
4
.husky/pre-commit
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
yarn lint-staged
|
11
package.json
11
package.json
|
@ -20,6 +20,7 @@
|
|||
"commit": "commit",
|
||||
"lint": "eslint --format=pretty src/**/*.ts",
|
||||
"lint:save": "eslint --format=pretty --save src/**/*.ts",
|
||||
"postinstall": "husky install",
|
||||
"release:alpha": "standard-version --prelease alpha -s",
|
||||
"release:beta": "standard-version --prelease beta -s",
|
||||
"release:full": "standard-version -s",
|
||||
|
@ -147,14 +148,10 @@
|
|||
},
|
||||
"reportUnusedDisableDirectives": true
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged",
|
||||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"src/**/*.ts": ["yarn lint"]
|
||||
"src/**/*.ts": [
|
||||
"yarn lint"
|
||||
]
|
||||
},
|
||||
"commitlint": {
|
||||
"extends": [
|
||||
|
|
Reference in a new issue