Skip to content

Commit

Permalink
fix(commitlint-config): fix parser presets
Browse files Browse the repository at this point in the history
  • Loading branch information
andrepolischuk committed Feb 27, 2024
1 parent eb480c6 commit c4e7da7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
6 changes: 1 addition & 5 deletions packages/commitlint-config/conventional.js
Original file line number Diff line number Diff line change
@@ -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}-']
}
}
}
8 changes: 1 addition & 7 deletions packages/commitlint-config/index.js
Original file line number Diff line number Diff line change
@@ -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}-']
}
}
}
6 changes: 6 additions & 0 deletions packages/commitlint-config/preset-conventional.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
name: 'conventional-changelog-conventionalcommits',
parserOpts: {
issuePrefixes: ['#', '[A-Z]{2,10}-']
}
}
8 changes: 8 additions & 0 deletions packages/commitlint-config/preset-simple.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
name: 'conventional-changelog-conventionalcommits',
parserOpts: {
headerPattern: /^(.*)$/,
headerCorrespondence: ['subject'],
issuePrefixes: ['#', '[A-Z]{2,10}-']
}
}

0 comments on commit c4e7da7

Please sign in to comment.