1.0.1 • Published 4 years ago

commitlint-plugin-type-references v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

commitlint-plugin-type-references

This is a commitlint rule which allows one to specify the references-empty rule only for specific commit types

Installation

npm i -D @xyclos/commitlint-plugin-type-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: [
        "@xyclos/type-references"
    ],
    rules: {
        "references-empty-enum": [
            2,
            "never",
            [
                "fix",
                "feat"
            ]
        ]
    },
    parserPreset: {
        parserOpts: {
            issuePrefixes: ["ABC-"]
        }
    }
}

This project was bootstrapped with TSDX.

Local Development

Below is a list of commands you will probably find useful.

npm start or yarn start

Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab.

Your library will be rebuilt if you make edits.

npm run build or yarn build

Bundles the package to the dist folder. The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).

npm test or yarn test

Runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.

1.0.1

4 years ago