diff --git a/packages/commitlint-config/conventional.js b/packages/commitlint-config/conventional.js index 546d36b..d78f84a 100644 --- a/packages/commitlint-config/conventional.js +++ b/packages/commitlint-config/conventional.js @@ -1,12 +1,8 @@ module.exports = { extends: ['@commitlint/config-conventional'], + parserPreset: './preset-conventional', rules: { 'references-empty': [2, 'never'], 'subject-case': [2, 'never', ['start-case', 'pascal-case', 'upper-case']] - }, - parserPreset: { - parserOpts: { - issuePrefixes: ['#', '[A-Z]{2,10}-'] - } } } diff --git a/packages/commitlint-config/index.js b/packages/commitlint-config/index.js index cfa5461..70cbd6e 100644 --- a/packages/commitlint-config/index.js +++ b/packages/commitlint-config/index.js @@ -1,13 +1,7 @@ module.exports = { extends: ['./conventional.js'], + parserPreset: './preset-simple', rules: { 'type-empty': [0] - }, - parserPreset: { - parserOpts: { - headerPattern: /^(.*)$/, - headerCorrespondence: ['subject'], - issuePrefixes: ['#', '[A-Z]{2,10}-'] - } } } diff --git a/packages/commitlint-config/preset-conventional.js b/packages/commitlint-config/preset-conventional.js new file mode 100644 index 0000000..86abbdd --- /dev/null +++ b/packages/commitlint-config/preset-conventional.js @@ -0,0 +1,6 @@ +module.exports = { + name: 'conventional-changelog-conventionalcommits', + parserOpts: { + issuePrefixes: ['#', '[A-Z]{2,10}-'] + } +} diff --git a/packages/commitlint-config/preset-simple.js b/packages/commitlint-config/preset-simple.js new file mode 100644 index 0000000..2bf60c2 --- /dev/null +++ b/packages/commitlint-config/preset-simple.js @@ -0,0 +1,8 @@ +module.exports = { + name: 'conventional-changelog-conventionalcommits', + parserOpts: { + headerPattern: /^(.*)$/, + headerCorrespondence: ['subject'], + issuePrefixes: ['#', '[A-Z]{2,10}-'] + } +}