chore: clean up web ui repo hygiene

This commit is contained in:
kacper 2026-03-14 20:21:44 -04:00
parent 94e62c9456
commit 2fcc9db903
4786 changed files with 1271 additions and 1275231 deletions

34
.githooks/pre-commit Executable file
View file

@ -0,0 +1,34 @@
#!/usr/bin/env bash
set -euo pipefail
repo_root="$(git rev-parse --show-toplevel)"
cd "${repo_root}"
mapfile -t staged_files < <(git diff --cached --name-only --diff-filter=ACMR)
if [[ ${#staged_files[@]} -eq 0 ]]; then
exit 0
fi
run_backend=false
run_frontend=false
for file in "${staged_files[@]}"; do
case "${file}" in
app.py|supertonic_gateway.py|voice_rtc.py|wisper.py|requirements.txt|.ruff.toml|scripts/check_python_quality.sh)
run_backend=true
;;
frontend/*|scripts/check_frontend_quality.sh)
run_frontend=true
;;
esac
done
if [[ "${run_backend}" == "true" ]]; then
echo "Running backend Python checks..."
./scripts/check_python_quality.sh
fi
if [[ "${run_frontend}" == "true" ]]; then
echo "Running frontend checks..."
./scripts/check_frontend_quality.sh
fi