Skip to content

leodido/validate-commit

Repository files navigation

Validate Commit

NPM version Build Status Coveralls Status Dependency Status Downloads

Validate commit messages according to various presets

Install

npm i validate-commit --save-dev

Description

Even though there are a couple of other packages that do this, I wanted to release this one with a few quality of life changes.

  • Uses Chalk to color messages
  • Outputs all the scopes when the scope is incorrect

Example

example

Usage

Git Hook

Using git-scripts

"git": {
    "scripts": {
        "commit-msg": "./node_modules/.bin/validate-commit-msg $1"
    }
}

CLI

$ validate-commit-msg 'chore(package): some message'

Module

var validateCommit = require('validate-commit');

validateCommit('chore(package): some message'); // true

Development

npm i && typings install

License

Apache-2.0 © Will Soto

About

Validate commit messages

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published