[GH-ISSUE #458] [Feature]: Pre-Commit - Enforce test & compile & lint for the Frontend & Backend #283

Closed
opened 2026-05-06 12:27:55 +02:00 by BreizhHardware · 3 comments

Originally created by @aneopsy on GitHub (Feb 20, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/458

Originally assigned to: @maziggy on GitHub.

Problem or Use Case

The repo currently has pre-commit installed, but it's still possible to commit and push code containing lint or compilation errors. It would be better to enforce all prechecks through pre-commit hooks, ensuring a cleaner repository and reducing the need for fix-up commits.

I can take care of it if needed.

Proposed Solution

.

Alternatives Considered

No response

Feature Category

Other

Priority

Would improve my workflow

Mockups or Examples

No response

Contribution

  • I would be willing to help implement this feature

Checklist

  • I have searched existing issues to ensure this feature hasn't already been requested
Originally created by @aneopsy on GitHub (Feb 20, 2026). Original GitHub issue: https://github.com/maziggy/bambuddy/issues/458 Originally assigned to: @maziggy on GitHub. ### Problem or Use Case The repo currently has pre-commit installed, but it's still possible to commit and push code containing lint or compilation errors. It would be better to enforce all prechecks through pre-commit hooks, ensuring a cleaner repository and reducing the need for fix-up commits. I can take care of it if needed. ### Proposed Solution . ### Alternatives Considered _No response_ ### Feature Category Other ### Priority Would improve my workflow ### Mockups or Examples _No response_ ### Contribution - [x] I would be willing to help implement this feature ### Checklist - [x] I have searched existing issues to ensure this feature hasn't already been requested
BreizhHardware 2026-05-06 12:27:55 +02:00
Author
Owner

@maziggy commented on GitHub (Feb 20, 2026):

We already have pre-commit hooks with ruff (lint + format). Are you asking about adding frontend checks (TypeScript compilation, ESLint, etc.) to the pre-commit config? Not sure...

<!-- gh-comment-id:3932176770 --> @maziggy commented on GitHub (Feb 20, 2026): We already have pre-commit hooks with ruff (lint + format). Are you asking about adding frontend checks (TypeScript compilation, ESLint, etc.) to the pre-commit config? Not sure...
Author
Owner

@aneopsy commented on GitHub (Feb 20, 2026):

Pre-commit was installed on my machine but not activated for this repo (needed pre-commit install). I'm more familiar with Husky in npm projects, where hooks are automatically enforced on install without extra setup.

For this repo, it would be great if pre-commit can include checks for TypeScript compiler errors and linting, not just Python. (run npm run build before a commit)

<!-- gh-comment-id:3932291985 --> @aneopsy commented on GitHub (Feb 20, 2026): Pre-commit was installed on my machine but not activated for this repo (needed `pre-commit install`). I'm more familiar with Husky in npm projects, where hooks are automatically enforced on install without extra setup. For this repo, it would be great if pre-commit can include checks for TypeScript compiler errors and linting, not just Python. (run `npm run build` before a commit)
Author
Owner

@maziggy commented on GitHub (Feb 20, 2026):

Added frontend pre-commit hooks in branch 0.2.1b2:

  • frontend-typecheck — runs tsc --noEmit to catch TypeScript compilation errors
  • frontend-lint — runs eslint . to enforce linting rules

Both hooks only trigger when frontend/src/**/*.{ts,tsx} files are staged, so they won't slow down backend-only commits.

Regarding the pre-commit install step — that's inherent to how pre-commit works (it needs to register the git hook once per clone). We could look into automating that as part of a dev setup script in the future, but it's a separate concern from the hook definitions themselves.

<!-- gh-comment-id:3932417862 --> @maziggy commented on GitHub (Feb 20, 2026): Added frontend pre-commit hooks in branch 0.2.1b2: - frontend-typecheck — runs tsc --noEmit to catch TypeScript compilation errors - frontend-lint — runs eslint . to enforce linting rules Both hooks only trigger when frontend/src/**/*.{ts,tsx} files are staged, so they won't slow down backend-only commits. Regarding the pre-commit install step — that's inherent to how pre-commit works (it needs to register the git hook once per clone). We could look into automating that as part of a dev setup script in the future, but it's a separate concern from the hook definitions themselves.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy#283
No description provided.