1.1.3 • Published 2 years ago

git-commit-msg-validator v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

git-commit-msg-validator Node.js CI

This is simple git commit message validator.

Feature

You can force git commit message format with this. There are two modes.

  1. Types Mode Using types mode, commit message format of your project is forced like {TYPE} {TITLE} : {DESCRIPTION}. You can insert your own types into package.json using CLI.

  2. Regular Expression Mode Using regular expression mode, commit messages of your project are tested by regular expression you insert.

Usage

First, you add package info, meta data into your package.json.

$npx git-commit-msg-validator

image

Select mode what you will use. And enter types what you want to use.

That's it. Entered types are inserted into package.json. And scripts, devDependencies, symbolic link of git hooks are created automatically.

{
  "name": "test",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "scripts": {
    "postinstall": "git-commit-msg-validator"
  },
  "devDependencies": {
    "git-commit-msg-validator": "^1.0.2"
  },
  "git-commit-msg-validator": "[\"new-feature\", \"fix-bug\", \"update\", \"modify\"]"
}

After, git hooks registered. Test your commit messages.

$git add .
$git commit -m "commit test" // You will see error.

$git commit -m "[fix-bug] fix bugs in text input : fix no response bugs in input component." 
// The fix has been committed.

License

License: MIT

Copyright (c) 2022 이형준

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago