commitlint-plugin-custom-message

1.0.1 • Public • Published

commitlint-plugin-custom-message

This is commitlint plugin, through this, user can custom commitlint error message.

Install

npm install --save-dev commitlint-plugin-custom-message @commitlint/cli @commitlint/config-conventional

Usage

// commitlint.config.js

import buildCustomMessage from 'commitlint-plugin-custom-message'

export default {
  // ...
  plugins: [
    buildCustomMessage({
      // custom message rule key need add '-message' suffix
      'subject-empty-message': 'you need input subject',
      'type-empty-message': 'you need input commit type',
    }),
  ],
}

// > commitlint --config commitlint.config.js --edit .git/COMMIT_EDITMSG
//
// ⧗   input: test
// ✖   you need input subject [subject-empty]
// ✖   you need input commit type [type-empty]
//
// ✖   found 2 problems, 0 warnings
// ⓘ   Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint

Package Sidebar

Install

npm i commitlint-plugin-custom-message

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

7.85 kB

Total Files

6

Last publish

Collaborators

  • inksha