Skip to content

Commit

Permalink
fix: husky upgrade to v8 🎉
Browse files Browse the repository at this point in the history
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
  • Loading branch information
vinayakkulkarni committed Nov 1, 2022
1 parent 407eec9 commit 3fd5e2e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
19 changes: 18 additions & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
NAME=$(git config user.name)
EMAIL=$(git config user.email)

if [ -z "$NAME" ]; then
echo "empty git config user.name"
exit 1
fi

if [ -z "$EMAIL" ]; then
echo "empty git config user.email"
exit 1
fi

git interpret-trailers --if-exists doNothing --trailer \
"Signed-off-by: $NAME <$EMAIL>" \
--in-place "$1"

npm exec --no -- 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 run lint-staged
npm exec --no -- lint-staged --no-stash
4 changes: 0 additions & 4 deletions .husky/pre-push

This file was deleted.

0 comments on commit 3fd5e2e

Please sign in to comment.