al-quran.reflectslight.io/.husky/pre-commit

12 lines
200 B
Text
Raw Normal View History

2023-07-16 09:27:56 +02:00
#!/usr/bin/env sh
pattern=".ts|.tsx|.js$"
git diff --cached --name-only | grep -q -E -e "${pattern}"
if [ "$?" = "0" ]; then
npm run prettier || exit 1
npm run eslint || exit 1
else
exit 0
fi