Commitlint plugin that supports only check regex match scope parts
npm install commitlint-plugin-regexscopeA commitlint pulgin that supports only check regex match scope parts
``shell`
npm install --save-dev commitlint-plugin-regexscope
And confighure commitlint.config.js to use regexscope plugin.
`javascript`
module.exports = {
plugins: ['commitlint-plugin-regexscope'],
rules: {
'regexscope': [2, 'always', {
pattern: '',
clean: null,
enum: [
'core',
'ui'
],
case: 'lower-case'
}]
}
}
- pattern?: string | RegExp
- specify substring which you want to check
- default: clean?: string | RegExp
- null
- clean your substring to match enum
- default: enum?: string[]
- regex matched subscope
- conditon: is found in enum[]
- default: case?: string
- scope
- condition: is in case lower-case`
- default: