Private
Public Access
1
0

fix: ESLint errors and update git hooks to include ESLint
All checks were successful
CI Pipeline / Rust Format Check (push) Successful in 2s
CI Pipeline / Clippy Lints (push) Successful in 46s
CI Pipeline / Rust Unit Tests (push) Successful in 1m2s
CI Pipeline / Security Audit (push) Successful in 4s
CI Pipeline / Frontend Lint & Type Check (push) Successful in 13s
CI Pipeline / Build .deb & Release (push) Successful in 3m19s

- HostDetailPage.tsx: fix eqeqeq (!= to !==)
- HostsPage.tsx: merge duplicate @mui/icons-material imports
- PatchDeploymentPage.tsx: merge duplicate @mui/icons-material imports
- pre-commit hook: add ESLint check
- pre-push hook: add ESLint check
This commit is contained in:
2026-05-06 17:46:10 +00:00
parent 6481899cb5
commit 8bef562dbc
5 changed files with 21 additions and 11 deletions

View File

@ -2,7 +2,7 @@
# =============================================================================
# Linux Patch Manager — Pre-Push Hook
# =============================================================================
# Safety net: verifies cargo fmt and frontend build pass before pushing.
# Safety net: verifies cargo fmt, ESLint, and TypeScript pass before pushing.
# Install: ./scripts/git-hooks/install.sh
# =============================================================================
@ -20,6 +20,15 @@ if [[ -f "${REPO_ROOT}/Cargo.toml" ]]; then
fi
fi
# ── Frontend ESLint ──────────────────────────────────────────────────────────
if [[ -f "${REPO_ROOT}/frontend/package.json" ]]; then
echo "[pre-push] Running ESLint ..."
if ! (cd "${REPO_ROOT}/frontend" && npx eslint src/ --ext .ts,.tsx --max-warnings 0 2>/dev/null); then
echo "[pre-push] ❌ ESLint check FAILED."
FAILED=1
fi
fi
# ── Frontend type check ─────────────────────────────────────────────────────
if [[ -f "${REPO_ROOT}/frontend/package.json" ]]; then
echo "[pre-push] Checking TypeScript types ..."