Browse Source

Add frontend pre-commit hooks for TypeScript and ESLint (#458)

Add frontend-typecheck (tsc --noEmit) and frontend-lint (eslint .)
hooks to .pre-commit-config.yaml. Both hooks only trigger when
frontend/src/**/*.{ts,tsx} files are staged.
maziggy 3 months ago
parent
commit
24f509d604
2 changed files with 15 additions and 0 deletions
  1. 14 0
      .pre-commit-config.yaml
  2. 1 0
      CHANGELOG.md

+ 14 - 0
.pre-commit-config.yaml

@@ -42,3 +42,17 @@ repos:
         pass_filenames: false
         types: [python]
         files: ^backend/app/
+      - id: frontend-typecheck
+        name: TypeScript type check
+        entry: bash -c 'cd frontend && npx tsc --noEmit'
+        language: system
+        pass_filenames: false
+        files: ^frontend/src/
+        types_or: [ts, tsx]
+      - id: frontend-lint
+        name: ESLint
+        entry: bash -c 'cd frontend && npx eslint .'
+        language: system
+        pass_filenames: false
+        files: ^frontend/src/
+        types_or: [ts, tsx]

+ 1 - 0
CHANGELOG.md

@@ -13,6 +13,7 @@ All notable changes to Bambuddy will be documented in this file.
 
 ### Improved
 - **Background Dispatch Test Coverage** — Added 5 backend unit tests for dispatch cancel races (single-lock TOCTOU fix), batch counter reset re-check, and job lifecycle. Added 2 FTP regression tests for voidresp error handling (upload-loop prevention) and A1 model voidresp skip. Added 1 frontend test for reprint toast suppression.
+- **Frontend Pre-Commit Hooks** ([#458](https://github.com/maziggy/bambuddy/issues/458)) — Added `frontend-typecheck` (`tsc --noEmit`) and `frontend-lint` (`eslint .`) hooks to the pre-commit config. Both hooks only trigger when `frontend/src/**/*.{ts,tsx}` files are staged.
 
 ## [0.2.1b] - 2026-02-19