# git-commit-msg-validator

> This is a simple git commit message validator.

Latest version **1.1.3** (published 2022-06-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install git-commit-msg-validator
pnpm add git-commit-msg-validator
yarn add git-commit-msg-validator
bun add git-commit-msg-validator
```

Provides the commands `git-commit-msg-validator`, `git-commit-msg-validator-run-hook`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2022-06-29 |
| First published | 2022-06-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 14.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | kokocan12 |
| Maintainers | kokocan12 |
| Keywords | commit message, commit msg, git, hook, lint, linter |

## Links

- npm: https://www.npmjs.com/package/git-commit-msg-validator
- Repository: https://github.com/kokocan12/git-commit-msg-validator
- Homepage: https://github.com/kokocan12/git-commit-msg-validator#readme
- Issues: https://github.com/kokocan12/git-commit-msg-validator/issues
- npm.io page: https://npm.io/package/git-commit-msg-validator

## Dependencies (2)

- [chalk](https://npm.io/package/chalk.md) 4.1.1
- [prettier](https://npm.io/package/prettier.md) ^2.7.1

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2022-06-29
- 1.1.2 — 2022-06-29
- 1.1.1 — 2022-06-29
- 1.1.0 — 2022-06-29
- 1.0.9 — 2022-06-29
- 1.0.8 — 2022-06-29
- 1.0.7 — 2022-06-29
- 1.0.6 — 2022-06-29
- 1.0.5 — 2022-06-29
- 1.0.4 — 2022-06-28
- 1.0.3 — 2022-06-28
- 1.0.2 — 2022-06-28
- 1.0.1 — 2022-06-28
- 1.0.0 — 2022-06-28

## README

# git-commit-msg-validator [![Node.js CI](https://github.com/kokocan12/git-commit-msg-validator/actions/workflows/node.js.yml/badge.svg?branch=master)](https://github.com/kokocan12/git-commit-msg-validator/actions/workflows/node.js.yml)

This is simple git commit message validator.

# Feature
You can force git commit message format with this.<br/>
There are two modes.

1. Types Mode <br/>
Using types mode, commit message format of your project is forced like [{TYPE}] {TITLE} : {DESCRIPTION}.</br>
You can insert your own types into package.json using CLI.

2. Regular Expression Mode <br/>
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.
```sh
$npx git-commit-msg-validator
```

![image](https://user-images.githubusercontent.com/49009864/176138559-89f5ff6b-2094-4363-848b-538f4c8c27e6.png)

Select mode what you will use. <br/>
And enter types what you want to use.

That's it.<br/>
Entered types are inserted into package.json.<br/>
And scripts, devDependencies, symbolic link of git hooks are created automatically.
```json
{
  "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.

```sh
$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](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/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.

---
_Source: https://npm.io/package/git-commit-msg-validator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
