@dlwlrma/commitlint-config

1.2.0 • Public • Published

Commitlint Config Preset

HanJeaHwan NPM version NPM Downloads

Installation

yarn add @dlwlrma/commitlint-config --D

After installation create a file commitlint.config.js at project root and extend the config:

{
  "extends": ["@dlwlrma/commitlint-config"],
  "rules": {}
}

Usage

Example for enforce ticket reference at commit message body

{
  "extends": ["@dlwlrma/commitlint-config"],
  "rules": {
    "ticket-rule": [2, "always", ["TICKET-"]]
  }
}

Simply read the commitlint documentation and follow those instructions.

Git Hook

Setup pre-commit hook for linting commit message.

yarn add husky --D
npm install husky --save-dev

Update package.json

  "husky": {
    "hooks": {
      "commit-msg": "commitlint -e $HUSKY_GIT_PARAMS",
    }
  }

Readme

Keywords

none

Package Sidebar

Install

npm i @dlwlrma/commitlint-config

Weekly Downloads

4

Version

1.2.0

License

MIT

Unpacked Size

4.2 kB

Total Files

4

Last publish

Collaborators

  • hanjeahwan