2024-03-02 04:08:55 -05:00
|
|
|
import conventional from '@commitlint/config-conventional';
|
|
|
|
import { UserConfig } from '@commitlint/types';
|
2021-07-04 02:01:02 -05:00
|
|
|
|
2022-10-10 03:41:02 -05:00
|
|
|
const isCi = process.env.CI === 'true';
|
|
|
|
|
2024-03-02 04:08:55 -05:00
|
|
|
const config: UserConfig = {
|
2021-07-04 02:01:02 -05:00
|
|
|
extends: ['@commitlint/config-conventional'],
|
|
|
|
rules: {
|
2024-03-02 04:08:55 -05:00
|
|
|
'type-enum': [2, 'always', [...conventional.rules['type-enum'][2], 'api', 'release']],
|
2024-08-18 23:16:10 -05:00
|
|
|
'scope-enum': [2, 'always', ['connector', 'console', 'core', 'demo-app', 'test', 'phrases', 'schemas', 'shared', 'experience', 'deps', 'deps-dev', 'cli', 'toolkit', 'cloud', 'app-insights', 'elements', 'translate']],
|
2022-10-10 03:41:02 -05:00
|
|
|
// Slightly increase the tolerance to allow the appending PR number
|
2023-08-02 07:54:15 -05:00
|
|
|
...(isCi && { 'header-max-length': [2, 'always', 110] }),
|
|
|
|
'body-max-line-length': [2, 'always', 110],
|
2021-07-04 02:01:02 -05:00
|
|
|
},
|
|
|
|
};
|
2024-03-02 04:08:55 -05:00
|
|
|
|
|
|
|
export default config;
|