0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/commitlint.config.ts

18 lines
774 B
TypeScript
Raw Normal View History

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