@fansy/commit-msg-validator

1.0.0 • Public • Published

Commit Message Validator

A tool for validate commit message.

usage

This tool dependencies on yorkie.

So we can add follow code in package.json:

{
    "gitHooks": {
        "commit-msg": "cmv"
    }
}

Rules

Every commit message must match the following RegExp:

const regexp = /^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|build|ci|chore|types|release|merge)(\(.+\))?: .{1,50}/;

Types

type description
feat new feature
fix fix bug
docs documentation
style styles
refactor refactor
test add or change test
chore daily change
perf imporove performance
workflow workflow change
build build
ci continuous integration
merge code merge
types typescript declaration
release version update

Example

We can use following format with commit message:

`type(socpe): commit message`

There are some examples:

//feature
feat(package): add a new function.

//daily change
chore(root): update package.json.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.00latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.00

Package Sidebar

Install

npm i @fansy/commit-msg-validator

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.71 kB

Total Files

4

Last publish

Collaborators

  • fanhaoyuan