Jiseoup/showmycodePublic
EN|KO
  • Code
  • Commits
  • Pull Requests
← Back to list
Merged

chore: replace commitlint with native git hooks

#19
JiseoupJiseoup · Jun 10, 2026chore/native-git-hooks → main
chore
OverviewCommitsFiles changed

Related Issue

N/A

Changes

  • Add native git hooks in .githooks/ — commit-msg enforces Conventional Commits prefixes (feat:, fix:, chore:, refactor:, docs:, i18n:), pre-push enforces matching branch name prefixes.
  • Hooks are activated automatically on npm install via the prepare script (git config core.hooksPath .githooks) — no husky needed.
  • Remove commitlint: it was never wired to a git hook, so it never actually ran. Deletes commitlint.config.js, two devDependencies, and 66 transitive packages.
  • Drop the unused test label from commit/branch conventions and the PR template, since this project intentionally has no test suite.
  • Document the hooks in CLAUDE.md.

How to Verify

  1. Run npm install (activates the hooks), then check git config core.hooksPath prints .githooks.
  2. git commit --allow-empty -m "bad message" → rejected with a prefix error.
  3. git commit --allow-empty -m "chore: valid message" → succeeds (then reset).
  4. Push a branch named without a prefix → rejected by pre-push.

Checklist

  • npm run format:check passes
  • npm run lint passes
  • npm run typecheck passes
  • npm run build passes
  • PR title follows Conventional Commits (feat:, fix:, chore:, refactor:, docs:, i18n:)