-
Notifications
You must be signed in to change notification settings - Fork 2
/
commitlint.config.cjs
39 lines (39 loc) · 1.19 KB
/
commitlint.config.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
module.exports = {
extends: [],
rules: {
'type-enum': [2, 'always'],
'colon-not-include': [2, 'always'],
},
plugins: [
{
rules: {
'colon-not-include': ({ header }) => {
return [header.includes(' :: '), `::이 포함되지 않았습니다.`];
},
'type-enum': ({ header }) => {
const types = new Set([
'build',
'ci',
'chore',
'design',
'docs',
'feat',
'fix',
'perf',
'refactor',
'style',
'test',
'revert',
'merge',
'project',
'delete',
]);
return [
types.has(header.split(' :: ')[0]),
`${header.split(' :: ')[0]}은 type으로 사용할 수 없습니다.`,
];
},
},
},
],
};