Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

commit-message-validator

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commit-message-validator

Git commit-msg hook validator

  • 0.1.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12K
increased by20.62%
Maintainers
1
Weekly downloads
 
Created
Source

commit-message-validator

Git commit-msg validator

This package provides you a binary that you can use as a git hook to validate the commit message.

This package can be used with githook packages such as husky.

If you are using husky, add "commitmsg": "commit-message-validator" to your npm scripts in package.json.

Installation

This module is distributed via npm which is bundled with node and should be installed as one of your project's devDependencies:

npm install commit-message-validator

Usage

  1. Install this package as one of your project's devDependencies

  2. Install githook husky

  3. Config commit-msg hook to run commit-message-validator in package.json

     {
         "husky": {
             "hooks": {
                 "commit-msg": "commit-message-validator"
             }
         }
     }
    
  4. Custom commit-message regex pattern in package.json

     {
         "config": {
             "commit-message-validator": {
                 "_comment": "pattern can be Regex string or array of Regex string",
                 "pattern": "your regex pattern here",
                 "errorMessage": "your error message"
             }
         }
     }
    

Keywords

FAQs

Package last updated on 13 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc