module.exports = { extends: ["@commitlint/config-conventional"], rules: { "scope-empty": [2, "never"], "scope-case": [2, "always", "kebab-case"], "scope-pattern": [2, "always"], "body-leading-blank": [2, "always"], "header-max-length": [2, "always", 100], }, plugins: [ { rules: { "scope-pattern": ({ scope }) => { if (!scope) { return [true]; } return [ /^cvg-\d+$/.test(scope), `scope must match cvg- (lowercase, dashed digits), got: ${scope}`, ]; }, }, }, ], };