chore: setup husky git hooks#69
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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 avalidatescript. - Adds Husky hooks for
commit-msg,pre-commit, andpre-pushto run typechecks/lints/tests. - Adds lint-staged and commitlint configuration, and extends UI scripts with a
typecheckcommand.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
.husky/commit-msgto enforce commit message conventions using commitlint..husky/pre-committo run lint-staged, UI typecheck/lint, and API vet/test based on staged files..husky/pre-pushto ensure UI typecheck and API tests pass before pushing.package.jsonwith Husky and lint-staged as dev dependencies, apreparescript to set up Husky, and avalidatescript to run all major checks.Linting and formatting configuration:
lint-staged.config.mjsto:gofmton staged API Go files.ui/package.jsonto add atypecheckscript for TypeScript type checking.Commit message convention:
commitlint.config.cjsto enforce conventional commit messages and set header and subject rules.Closes #68