fix: wire up husky commit-msg hook and update site branding - #584
Conversation
- husky v9 needs a `prepare` script and a .husky/ hook dir; the legacy v4-style config block in package.json was silently ignored, so commitlint never ran on fresh clones - site description still said 'Move4Mobile developers blog'; the blog is Framna's now
|
Visit the preview URL for this PR (updated for commit 606e62e): https://m4m-geekbites-dev--pr584-fix-husky-hook-and-b-o2jmi2tk.web.app (expires Sun, 12 Jul 2026 15:02:40 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 995f16c8ca726a359e48b7c460e5b3e3ea21476d |
There was a problem hiding this comment.
Pull request overview
This PR updates local developer workflow and branding by enabling Husky v9 commit-msg hooks for conventional commit linting and refreshing the site description to reflect current ownership.
Changes:
- Added a
preparescript (husky) and removed the legacy (ignored) Husky v4-style config frompackage.json. - Added a Husky
commit-msghook to runcommitlinton commit messages. - Updated the site description in
src/_data/site.jsto “Framna developer blog”.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/_data/site.js |
Updates the site description text to the new branding. |
package.json |
Ensures Husky installs hooks via prepare and removes legacy Husky config. |
.husky/commit-msg |
Adds the commit-msg hook intended to enforce conventional commits. |
| @@ -0,0 +1 @@ | |||
| npx --no -- commitlint --edit "$1" | |||
|
Re: the shebang comment — this is the official husky v9 hook format. Husky sets The hook was verified empirically on this branch: |
What
Wires up the husky commit-msg hook so conventional-commit linting actually runs, and refreshes outdated site branding.
Why
package.jsondeclaredhusky^9 and acommitlintconfig, but the only hook wiring was a legacy husky v4-style"husky": { "hooks": { ... } }block that husky v9 ignores. There was nopreparescript and no.husky/directory, so fresh clones got no git hook and bad commit messages were never rejected locally.Separately, the site description still read
Move4Mobile developers blog; the blog is Framna's now.Changes
"prepare": "husky"toscriptsso.husky/is registered on install."husky": { ... }config block frompackage.json..husky/commit-msg(husky v9 idiom, executable) runningnpx --no -- commitlint --edit "$1".src/_data/site.jsdescription toFramna developer blog. URL fields left unchanged (geekbites.move4mobile.iois still the live production domain).Test plan
git commit -m "bad message"fails with commitlintsubject-empty/type-emptyerrors)git commit -m "test: hook check"passes; the real PR commit also passed the hook)git config core.hooksPathresolves to.husky/_afternpm installran the prepare scriptnpm run buildsucceeds (eleventy wrote 27 files)