ujs/.githooks/pre-commit

24 lines
372 B
Plaintext
Raw Normal View History

2023-04-30 15:55:44 +03:00
#!/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..."
2023-04-30 17:39:03 +03:00
ec -exclude 'node_modules' . &> /dev/null
2023-04-30 15:55:44 +03:00
if [[ "$?" == 0 ]]; then
echo "✅ EditorConfig"
else
echo "⛔ EditorConfig error"
exit 1
fi