ujs/.githooks/pre-commit

24 lines
388 B
Plaintext
Raw Permalink 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..."
2024-01-09 18:53:20 +03:00
ec -exclude 'node_modules' -exclude 'venv' . &> /dev/null
2023-04-30 15:55:44 +03:00
if [[ "$?" == 0 ]]; then
echo "✅ EditorConfig"
else
echo "⛔ EditorConfig error"
exit 1
fi