Skip to content

chore: enforce Conventional Commits via commitlint hook and CI#873

Merged
PaulHax merged 3 commits intoKitware:mainfrom
PaulHax:enforce-conventional-commits
May 8, 2026
Merged

chore: enforce Conventional Commits via commitlint hook and CI#873
PaulHax merged 3 commits intoKitware:mainfrom
PaulHax:enforce-conventional-commits

Conversation

@PaulHax
Copy link
Copy Markdown
Collaborator

@PaulHax PaulHax commented May 8, 2026

Summary

  • Add @commitlint/cli + @commitlint/config-conventional; wire a commit-msg hook through the existing yorkie setup so non-conforming messages are rejected locally.
  • Add a CI job that runs commitlint against PR commits as a server-side safety net (covers --no-verify bypasses).
  • Modernize tool configs to ESM since the project is "type": "module": commitlint.config.js and prettier.config.js (was .cjs); drop the redundant --config ./prettier.config.cjs flags now that prettier auto-discovers the config.

Test plan

  • git commit -m "ultrasound: bad" is rejected locally by the commit-msg hook
  • git commit -m "fix(ultrasound): good" passes
  • CI commitlint job fails when a PR contains a non-conforming commit
  • npm run prettify and the CI prettier check still format/check the same files

PaulHax added 3 commits May 8, 2026 11:08
Adds @commitlint/cli + @commitlint/config-conventional and wires a
commit-msg hook through the existing yorkie setup so non-conforming
messages are rejected locally. A new CI job runs commitlint against
PR commits as a server-side safety net for --no-verify bypasses.
Project is "type": "module" so plain .js with `export default` is the
modern shape; the .cjs extension was unnecessary friction.
Project is "type": "module" so plain prettier.config.js with
`export default` is the modern shape. Prettier auto-discovers
prettier.config.{js,cjs,mjs} in the cwd, so the explicit
--config ./prettier.config.cjs in lint-staged and the CI check
was redundant — removed both.
@netlify
Copy link
Copy Markdown

netlify Bot commented May 8, 2026

Deploy Preview for volview-dev ready!

Name Link
🔨 Latest commit da2a4b4
🔍 Latest deploy log https://app.netlify.com/projects/volview-dev/deploys/69fdffb90085a5000748474d
😎 Deploy Preview https://deploy-preview-873--volview-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@PaulHax PaulHax added this pull request to the merge queue May 8, 2026
Merged via the queue into Kitware:main with commit 6d5f92f May 8, 2026
8 checks passed
@PaulHax PaulHax deleted the enforce-conventional-commits branch May 8, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant