Skip to content

Commit

Permalink
chore: migrate husky to its latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
xeptore committed Mar 31, 2021
1 parent e709421 commit b9b0af0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
npx --no-install lint-staged
4 changes: 4 additions & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

exec < /dev/tty && git cz --hook || true
7 changes: 0 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@
"@commitlint/cli": "^12.0.1",
"commitizen": "4.2.3"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"prepare-commit-msg": "exec < /dev/tty && git cz --hook || true",
"commit-msg": "commitLint -E HUSKY_GIT_PARAMS"
}
},
"lint-staged": {
"*.{css,json,md}": [
"prettier --write",
Expand Down

0 comments on commit b9b0af0

Please sign in to comment.