-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcommitlint.config.cjs
More file actions
42 lines (42 loc) · 984 Bytes
/
commitlint.config.cjs
File metadata and controls
42 lines (42 loc) · 984 Bytes
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
40
41
42
/**
* Custom config for commitlint based on Linchpin needs/conventions.
*
* This config only slightly modifies the default config to allow for "improve" as a type
* and adds support for ClickUp or Github issue numbers in the commit message.
*
* Format Example
*
* feat(LINCHPIN-4850): Add new feature or GitHub issue number or NO-TASK if cowboying it on the fly.
*/
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
'type-enum': [
2,
'always',
[
'improve',
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
'update',
],
],
'subject-case': [1, 'always', ['sentence-case']],
},
parserPreset: {
parserOpts: {
headerPattern:
/^(improve|build|ci|feat|fix|docs|style|revert|perf|refactor|test|chore)\(((?:[A-Z]+-\d+)|(?:NO-TASK)|(?:\#\d+))\):\s?([\w\d\s,\-]*)/,
headerCorrespondence: ['type', 'scope', 'subject'],
},
}
};