@dwmt/commitlint-plugin-jira-type

2.0.0 • Public • Published

Commitlint Jira Type | Plugin

Commitlint plugin to check if your commit messages start with a a JIRA ticket identifier and a type.

Accepts commit messages like:

PROJECT-1/feat: implemented a new message handler
KEY-729/fix: removed erroneous handling of a key

Getting Started

If you want to lint your commits with jira-type, follow along:

  1. Install Commitlint, Husky and the jira-type dependencies
    npm i @commitlint/cli husky @dwmt/commitlint-plugin-jira-type @dwmt/commitlint-config-jira-type -D
    
  2. Configure commitlint
    // commitlint.config.js
    module.exports = {
      plugins: ['@dwmt/commitlint-plugin-jira-type'],
      extends: ['@dwmt/commitlint-config-jira-type'],
    }
  3. Setup Husky: to lint commits before they are created you can use Husky's commit-msg hook
    mkdir .husky
    npx husky add .husky/commit-msg "npx --no-install commitlint --edit $1"
    

You can find detailed instructions regarding the local setup of Commitlint and Husky at Commitlint Local Setup.

Further Information

Please see the README of the parent monorepo.

/@dwmt/commitlint-plugin-jira-type/

    Package Sidebar

    Install

    npm i @dwmt/commitlint-plugin-jira-type

    Weekly Downloads

    1,294

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    19.2 kB

    Total Files

    23

    Last publish

    Collaborators

    • battila7
    • lajoskvcs
    • baximus