commitlint-plugin-references

1.0.0 • Public • Published

commitlint-plugin-references

A commitlint rule for conditionally requiring references in commit messages for given types.

Forked from https://github.com/episerver/commitlint-plugin-references But since it seems not be maintained. So I forked it and make a new package.

Installation

yarn

yarn add --dev commitlint-plugin-references

npm

npm install --save-dev commitlint-plugin-references

Usage

To configure that references should never be empty for fix and feat. It is also possible to specify the issue prefix in parserPreset, the default value is #.

module.exports = {
    plugins: [
        "references"
    ],
    rules: {
        "references-empty-enum": [
            2,
            "never",
            [
                "fix",
                "feat"
            ]
        ]
    },
    parserPreset: {
        parserOpts: {
            issuePrefixes: ["ABC-"]
        }
    }
};

Dependencies (2)

Dev Dependencies (3)

Package Sidebar

Install

npm i commitlint-plugin-references

Weekly Downloads

8

Version

1.0.0

License

MIT

Unpacked Size

5.61 kB

Total Files

8

Last publish

Collaborators

  • maplemiao