msg-time

0.1.1 • Public • Published

msg-time

Conventional commit message enforcer

banner

npm coverage npm type definitions license install size

msg-time checks that your commit message is a Conventional Commit. If it doesn't match the spec, it will block the commit and print out a helpful error message (like commitlint).

It performs the same Conventional Commit checking but with a far smaller footprint.

When used with simple-git-hooks or husky, it will block non-compliant commit messages.

Background

Why not just use commitlint instead?

msg-time commitlint
0 deps 200 nested deps
26.5MB

commitlint = @commitlint/cli + @commitlint/config-conventional

Install

This package is available from the npm registry.

npm install --save-dev msg-time

Usage

With husky:

npx husky add .husky/commit-msg 'npx msg-time'

With simple-git-hooks:

{
  "name": "your-package-json",
  // ...
  "simple-git-hooks": {
    "commit-msg": "npx msg-time"
  }
  // ...
}

Contributing

GitHub issues / PRs welcome.

Dev environment requires:

  • node >= 16.14.0
  • npm >= 6.8.0
  • git >= 2.11

Licence

Apache-2.0

Package Sidebar

Install

npm i msg-time

Weekly Downloads

14

Version

0.1.1

License

Apache-2.0

Unpacked Size

10.2 kB

Total Files

7

Last publish

Collaborators

  • tbjgolden