diff --git a/.husky/pre-commit b/.husky/pre-commit index 585d831903..d2adc74e73 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,7 +1,12 @@ #!/bin/bash -RED="\033[1;31m" ; NC="\033[0m" +# Init UI colors +NC="\033[0m" # no color +BR="\033[1;91m" # bright red +BY="\033[1;33m" # bright yellow +# Run ESLint for JavaScript + JSON + Markdown + YAML +echo -e "\n${BY}Running ESLint...${NC}" if npm ls -g eslint &> /dev/null || npm ls eslint &> /dev/null ; then npm run lint else @@ -9,7 +14,7 @@ else cd "$(dirname "$0")/.." && # nav to root [ "$OSTYPE" == "msys" ] && pwd -W || pwd # get absolute path ) - echo -e "\n${RED}Warning: eslint not installed${NC}" + echo -e "\n${BR}Warning: ESLint not installed${NC}" echo -e " To add missing dependencies, run 'npm install' from" echo -e " $PROJECT_ROOT\n" fi