-
Notifications
You must be signed in to change notification settings - Fork 8
/
.commitlintrc.js
105 lines (103 loc) · 2.68 KB
/
.commitlintrc.js
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
const configLerna = require('@commitlint/config-lerna-scopes');
module.exports = {
extends: [
'@commitlint/config-conventional',
'@commitlint/config-lerna-scopes',
],
rules: {
'type-enum': [
2,
'always',
[
/*
* FAQ:
*
* * Q: What to use when removing a feature (removing a function,
* dropping support for some platform, etc.)?
* A: `feat` with breaking change.
* * Q: What to use when renaming some public interface?
* A: `refactor` with breaking change.
* * Q: What to use when deprecating something?
* A: `docs`.
*/
/**
* Changes to CI
*/
'ci',
/**
* Use this when changing the "infrastructure" side of the project:
*
* * Introducing new tools or changing their configuration
* (e.g. linters, formatters,)
* * Changing configuration of existing tools
*
* Often `chore` is used, but IMHO these are not "chores".
* Tooling are pretty important and often require considerable effort
* to setup.
*
* NOTE: these changes should not impact anybody except the developers
* of the project.
*/
'infra',
/**
* Changes concerning the package manager and dependencies that dont't
* impact users
*/
'deps',
/**
* Documentation related changes
*/
'docs',
/**
* New feature for the user.
*
* * For an library package the user is an application developer
* * For an application package the user is the end-user
*/
'feat',
/**
* Fix
*/
'fix',
/**
* Performance improvement
*/
'perf',
/**
* Non cosmetic changes to the codebase that shouldn't change any
* behaviour of the existing code.
*/
'refactor',
'revert',
/**
* Cosmetic changes to the codebase
*/
'style',
'test',
/**
* Generic improvement to the code
*/
'improvement',
'chore',
],
],
'scope-enum': (ctx) =>
configLerna.utils.getPackages(ctx).then((packages) => [
2,
'always',
packages.concat(
/*
* All package names are allowed scopes. But we define some
* additional scopes.
*/
[
'release',
/*
* Big changes that affect many packages
*/
'all',
]
),
]),
},
};