We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f18733 commit 726492fCopy full SHA for 726492f
.husky/pre-commit
@@ -1,15 +1,20 @@
1
#!/bin/bash
2
3
-RED="\033[1;31m" ; NC="\033[0m"
+# Init UI colors
4
+NC="\033[0m" # no color
5
+BR="\033[1;91m" # bright red
6
+BY="\033[1;33m" # bright yellow
7
8
+# Run ESLint for JavaScript + JSON + Markdown + YAML
9
+echo -e "\n${BY}Running ESLint...${NC}"
10
if npm ls -g eslint &> /dev/null || npm ls eslint &> /dev/null ; then
11
npm run lint
12
else
13
PROJECT_ROOT=$(
14
cd "$(dirname "$0")/.." && # nav to root
15
[ "$OSTYPE" == "msys" ] && pwd -W || pwd # get absolute path
16
)
- echo -e "\n${RED}Warning: eslint not installed${NC}"
17
+ echo -e "\n${BR}Warning: ESLint not installed${NC}"
18
echo -e " To add missing dependencies, run 'npm install' from"
19
echo -e " $PROJECT_ROOT\n"
20
fi
0 commit comments