commitlint-plugin-regexscope

0.0.1 • Public • Published

Commitlint Plugin Regexscope

A commitlint pulgin that supports only check regex match scope parts

Getting Started

npm install --save-dev commitlint-plugin-regexscope

And confighure commitlint.config.js to use regexscope plugin.

module.exports = {
    plugins: ['commitlint-plugin-regexscope'],
    rules: {
        'regexscope': [2, 'always', {
            pattern: '', 
            clean: null, 
            enum: [
                'core',
                'ui'
            ],
            case: 'lower-case'
        }]
    }
}

options: RegexScopeOptions

  • pattern?: string | RegExp
    • specify substring which you want to check
    • default: ``
  • clean?: string | RegExp
    • clean your substring to match enum
    • default: null
  • enum?: string[]
    • conditon: regex matched subscope is found in enum
    • default: []
  • case?: string
    • condition: scope is in case
    • default: lower-case

/commitlint-plugin-regexscope/

    Package Sidebar

    Install

    npm i commitlint-plugin-regexscope

    Weekly Downloads

    38

    Version

    0.0.1

    License

    MIT

    Unpacked Size

    4.02 kB

    Total Files

    5

    Last publish

    Collaborators

    • hikawa_rin