21 lines
400 B
Bash
Executable file
21 lines
400 B
Bash
Executable file
#!/bin/sh
|
|
|
|
clear
|
|
|
|
echo "Running Biome format..."
|
|
bunx @biomejs/biome format --write
|
|
|
|
if [ $? -ne 0 ]; then
|
|
echo "❌ Biome format failed. Commit rejected."
|
|
exit 1
|
|
fi
|
|
|
|
echo "Running Biome check on staged files..."
|
|
bunx @biomejs/biome check --staged --error-on-warnings --no-errors-on-unmatched
|
|
|
|
if [ $? -ne 0 ]; then
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ All checks passed. Proceeding with commit."
|
|
exit 0
|