Skip to content

Commit

Permalink
ci: add custom commitlint config
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-capsule42 committed Jul 27, 2024
1 parent 39c24ab commit 11ea5e7
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
const Configuration = {
/*
* Resolve and load @commitlint/config-conventional from node_modules.
* Referenced packages must be installed
*/
extends: ['@commitlint/config-conventional'],
/*
* Resolve and load conventional-changelog-atom from node_modules.
* Referenced packages must be installed
*/
parserPreset: 'conventional-changelog-atom',
/*
* Resolve and load @commitlint/format from node_modules.
* Referenced package must be installed
*/
formatter: '@commitlint/format',
/*
* Any rules defined here will override rules from @commitlint/config-conventional
*/
rules: {
'footer-max-line-length': [
RuleConfigSeverity.Warning,
'always',
100,
],
},
/*
* Array of functions that return true if commitlint should ignore the given message.
* Given array is merged with predefined functions, which consist of matchers like:
*
* - 'Merge pull request', 'Merge X into Y' or 'Merge branch X'
* - 'Revert X'
* - 'v1.2.3' (ie semver matcher)
* - 'Automatic merge X' or 'Auto-merged X into Y'
*
* To see full list, check https://github.com/conventional-changelog/commitlint/blob/master/%40commitlint/is-ignored/src/defaults.ts.
* To disable those ignores and run rules always, set `defaultIgnores: false` as shown below.
*/
ignores: [(commit) => commit === ''],
/*
* Whether commitlint uses the default ignore rules, see the description above.
*/
defaultIgnores: true,
/*
* Custom URL to show upon failure
*/
helpUrl:
'https://github.com/conventional-changelog/commitlint/#what-is-commitlint',
/*
* Custom prompt configs
*/
prompt: {
messages: {},
questions: {
type: {
description: 'please input type:',
},
},
},
};

export default Configuration;

0 comments on commit 11ea5e7

Please sign in to comment.