Skip to content

Commit

Permalink
fix(husky): auto-fixed lint files are staged after commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Badisi committed Sep 9, 2024
1 parent 4dde8d3 commit f24a940
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 0 additions & 4 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
printf "> Validating commit message... "
npx --no -- commitlint --edit "$1"
printf "OK\n"

printf "> Linting staged files... "
npx --no -- lint-staged --quiet
printf "OK\n"
5 changes: 4 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
printf "> Validating user email... "

gitUserEmail="$(git config user.email)"
if [[ $gitUserEmail =~ ^.*@(hcuge|hug).ch$ ]] ; then
printf "\n"
Expand All @@ -12,3 +11,7 @@ if [[ $gitUserEmail =~ ^.*@(hcuge|hug).ch$ ]] ; then
else
printf "OK\n"
fi

printf "> Linting staged files... "
npx --no -- lint-staged --quiet
printf "OK\n"

0 comments on commit f24a940

Please sign in to comment.