Skip to content

chore: setup husky git hooks#69

Merged
martian56 merged 1 commit into
mainfrom
68-setup-husky-git-hooks-for-frontend-backend
Mar 25, 2026
Merged

chore: setup husky git hooks#69
martian56 merged 1 commit into
mainfrom
68-setup-husky-git-hooks-for-frontend-backend

Conversation

@martian56
Copy link
Copy Markdown
Member

This pull request introduces a comprehensive developer experience and code quality automation setup for the project. It adds Husky-managed Git hooks for commit message linting, pre-commit checks, and pre-push validation; configures lint-staged for efficient staged file formatting and linting; and establishes a commit message convention. Additionally, supporting configuration files and scripts are added or updated to enable these workflows.

Git hooks and automation:

  • Added Husky Git hooks:
    • .husky/commit-msg to enforce commit message conventions using commitlint.
    • .husky/pre-commit to run lint-staged, UI typecheck/lint, and API vet/test based on staged files.
    • .husky/pre-push to ensure UI typecheck and API tests pass before pushing.
  • Added package.json with Husky and lint-staged as dev dependencies, a prepare script to set up Husky, and a validate script to run all major checks.

Linting and formatting configuration:

  • Added lint-staged.config.mjs to:
    • Run ESLint (with autofix) on staged UI TypeScript/TSX files.
    • Run Prettier on staged UI CSS/JSON/Markdown files.
    • Run gofmt on staged API Go files.
  • Updated ui/package.json to add a typecheck script for TypeScript type checking.

Commit message convention:

  • Added commitlint.config.cjs to enforce conventional commit messages and set header and subject rules.

Closes #68

@martian56 martian56 added this to the Deadline milestone Mar 25, 2026
@martian56 martian56 requested review from a team, Javenn0, Rafetikus and nazarli-shabnam March 25, 2026 19:09
@martian56 martian56 self-assigned this Mar 25, 2026
Copilot AI review requested due to automatic review settings March 25, 2026 19:09
@martian56 martian56 added the enhancement New feature or request label Mar 25, 2026
Copy link
Copy Markdown
Member

@Rafetikus Rafetikus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@martian56 martian56 merged commit e733bb0 into main Mar 25, 2026
9 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a repo-level developer tooling setup to enforce commit conventions and automate UI/API quality checks via Husky hooks, lint-staged, and commitlint.

Changes:

  • Introduces a root package.json/lockfile to manage Husky, lint-staged, and commitlint plus a validate script.
  • Adds Husky hooks for commit-msg, pre-commit, and pre-push to run typechecks/lints/tests.
  • Adds lint-staged and commitlint configuration, and extends UI scripts with a typecheck command.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
ui/package.json Adds a typecheck script used by hooks and repo validation.
package.json New root tooling package definition and validate/prepare scripts for hooks.
package-lock.json Locks Husky/lint-staged/commitlint dependency tree at repo root.
lint-staged.config.mjs Defines staged-file formatting/linting for UI and API.
commitlint.config.cjs Enforces conventional commit message rules.
.husky/commit-msg Runs commit message linting at commit time.
.husky/pre-commit Runs lint-staged and conditional UI/API checks based on staged paths.
.husky/pre-push Runs UI typecheck and API tests before push.
.gitignore Ignores node_modules/ at the repo level.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .husky/commit-msg
Comment thread lint-staged.config.mjs
Comment thread package.json
Comment thread package.json
Copy link
Copy Markdown
Member

@nazarli-shabnam nazarli-shabnam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@martian56 martian56 deleted the 68-setup-husky-git-hooks-for-frontend-backend branch May 2, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup Husky Git Hooks for Frontend & Backend

4 participants