-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.js
More file actions
25 lines (25 loc) · 896 Bytes
/
commitlint.config.js
File metadata and controls
25 lines (25 loc) · 896 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
/**
* 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
*
* chore(MANTLE-123|NO-TASK|#123): Did a thing
*
* or if you have no issue number you can utilize NO-TASK
*/
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [2, 'always', ['improve', 'build','chore','ci','docs','feat','fix','perf','refactor','revert','style','test']],
'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"]
}
}
};