0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00
logto/commitlint.config.cjs

16 lines
701 B
JavaScript
Raw Normal View History

2021-07-04 02:01:02 -05:00
const { rules } = require('@commitlint/config-conventional');
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: {
'type-enum': [2, 'always', [...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']],
// 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
},
};