From b7689fa460961e3a2953aa58b9d6923d4b379dbd Mon Sep 17 00:00:00 2001 From: 69pmb Date: Thu, 15 Feb 2024 10:27:15 +0100 Subject: [PATCH] chore: git hook config --- .husky/pre-commit | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.husky/pre-commit b/.husky/pre-commit index 56aa0079..bbd36dd3 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,10 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" +if [[ ! $(git config --get user.email) =~ .*gmail.* ]]; then + echo "Use project gitconfig before commit" + echo "For this, run the following command: 'git config include.path "../.gitconfig"'" + exit 1 +fi + pnpm -s dlx lint-staged -q --concurrent false