2021-07-04 02:01:02 -05:00
|
|
|
const { rules } = require('@commitlint/config-conventional');
|
|
|
|
|
2022-10-10 03:41:02 -05:00
|
|
|
const isCi = process.env.CI === 'true';
|
|
|
|
|
2021-08-25 10:36:11 -05:00
|
|
|
/** @type {import('@commitlint/types').UserConfig} **/
|
2021-07-04 02:01:02 -05:00
|
|
|
module.exports = {
|
|
|
|
extends: ['@commitlint/config-conventional'],
|
|
|
|
rules: {
|
2022-07-01 09:39:21 -05:00
|
|
|
'type-enum': [2, 'always', [...rules['type-enum'][2], 'api', 'release']],
|
2023-02-18 05:37:49 -05:00
|
|
|
'scope-enum': [2, 'always', ['connector', 'console', 'core', 'demo-app', 'test', 'phrases', 'schemas', 'shared', 'ui', 'deps','cli', 'toolkit', 'cloud']],
|
2022-10-10 03:41:02 -05:00
|
|
|
// Slightly increase the tolerance to allow the appending PR number
|
|
|
|
...(isCi && { 'header-max-length': [2, 'always', 110] })
|
2021-07-04 02:01:02 -05:00
|
|
|
},
|
|
|
|
};
|