ujs/.githooks/pre-commit

24 lines
388 B
Bash
Executable File

#!/bin/sh
# prettier
echo "Checking by Prettier..."
prettier --check . &> /dev/null
if [[ "$?" == 0 ]]; then
echo "✅ Prettier"
else
echo "⛔ Prettier error"
exit 1
fi
# editorconfig
echo "Checking by EditorConfig..."
ec -exclude 'node_modules' -exclude 'venv' . &> /dev/null
if [[ "$?" == 0 ]]; then
echo "✅ EditorConfig"
else
echo "⛔ EditorConfig error"
exit 1
fi