You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.3 KiB
57 lines
1.3 KiB
module.exports = {
|
|
ignores: [(commit) => commit.includes('init')],
|
|
extends: ['@commitlint/config-conventional'],
|
|
parserPreset: {
|
|
parserOpts: {
|
|
headerPattern: /^(\w*|[\u4e00-\u9fa5]*)(?:[\(\(](.*)[\)\)])?[\:\:] (.*)/,
|
|
headerCorrespondence: ['type', 'scope', 'subject'],
|
|
referenceActions: [
|
|
'close',
|
|
'closes',
|
|
'closed',
|
|
'fix',
|
|
'fixes',
|
|
'fixed',
|
|
'resolve',
|
|
'resolves',
|
|
'resolved',
|
|
],
|
|
issuePrefixes: ['#'],
|
|
noteKeywords: ['BREAKING CHANGE'],
|
|
fieldPattern: /^-(.*?)-$/,
|
|
revertPattern: /^Revert\s"([\s\S]*)"\s*This reverts commit (\w*)\./,
|
|
revertCorrespondence: ['header', 'hash'],
|
|
warn() {},
|
|
mergePattern: null,
|
|
mergeCorrespondence: null,
|
|
},
|
|
},
|
|
rules: {
|
|
'body-leading-blank': [2, 'always'],
|
|
'footer-leading-blank': [1, 'always'],
|
|
'header-max-length': [2, 'always', 108],
|
|
'subject-empty': [2, 'never'],
|
|
'type-empty': [2, 'never'],
|
|
'type-enum': [
|
|
2,
|
|
'always',
|
|
[
|
|
'feat',
|
|
'fix',
|
|
'perf',
|
|
'style',
|
|
'docs',
|
|
'test',
|
|
'refactor',
|
|
'build',
|
|
'ci',
|
|
'chore',
|
|
'revert',
|
|
'wip',
|
|
'workflow',
|
|
'types',
|
|
'release',
|
|
],
|
|
],
|
|
},
|
|
};
|
|
|