Skip to main content
Wright Websites

commit-gauge

lint Conventional Commits

Lightweight Conventional Commits linter for git hooks and CI: lints a message, a file, stdin or a commit range, explains every problem and suggests a corrected header.

  • 65/week on npm
  • 2★
  • MIT
  • v1.1.0
  • Developer Tooling
npx commit-gauge

Read the full README on GitHub (opens in a new tab)View on npm (opens in a new tab)

commit-gauge

From the README

commit-gauge checks commit messages against Conventional Commits. It tells you what's wrong and also what to write instead. Fixed the Login bug. gets the suggestion fix: fix the Login bug, and feature(API): Added new endpoint. gets feat(api): add new endpoint. Use it as a commit-msg hook, on a single message, or on every commit in a pull request.

npm install --save-dev commit-gauge
npx commit-gauge --install-hook                 # lint every commit message locally
npx commit-gauge -m "feature(API): Added new endpoint."
npx commit-gauge --from origin/main --to HEAD   # every commit on this branch
git log -1 --format=%B | npx commit-gauge --stdin

Related packages

Developer Tooling