From 88150c2e640eb7873e9bf110662ff3184a851a3b Mon Sep 17 00:00:00 2001 From: Daniel Heras Quesada Date: Mon, 14 Jul 2025 22:36:50 +0200 Subject: [PATCH] feat: minor git hooks improvements --- .githooks/pre-commit | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index a4f2ec5..4045a6d 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -10,10 +10,16 @@ if [[ $? != 0 ]]; then echo -e "\e[31m➤ [JEST]\e[0m Errors in tests\e[37m - \e[33m$(date +"%H:%M:%S")\e[0m" exit -1; fi +echo -e "\e[32m➤ [JEST]\e[0m Testing ok\e[37m - \e[33m$(date +"%H:%M:%S")\e[0m" ## Prettier echo -e "\e[35m➤ [PRETTIER]\e[0m Formatting front files\e[37m - \e[33m$(date +"%H:%M:%S")\e[0m" npx prettier . --write --log-level silent +if [[ $? != 0 ]]; then + echo -e "\e[31m➤ [PRETTIER]\e[0m Error while formatting files\e[37m - \e[33m$(date +"%H:%M:%S")\e[0m" + exit -1; +fi +echo -e "\e[32m➤ [PRETTIER]\e[0m Formatting ok\e[37m - \e[33m$(date +"%H:%M:%S")\e[0m" ## ESlint echo -e "\e[35m➤ [ESLINT]\e[0m Checking front code\e[37m - \e[33m$(date +"%H:%M:%S")\e[0m"