forked from build-trust/ockam-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
commitlint.config.js
99 lines (82 loc) · 3.5 KB
/
commitlint.config.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
// This file is used to lint our commit messages with commitlint
// https://commitlint.js.org/
// Each commit message consists of a header, a body and a footer.
// The header includes a type, a scope and a subject:
// <type>(<scope>): <subject>
// <BLANK LINE>
// <body>
// <BLANK LINE>
// <footer>
//
module.exports = {
// More about these rules https://commitlint.js.org/#/reference-rules
rules: {
// <type>(<scope>): <subject> must not be longer that 100 characters
'header-max-length': [2, 'always', 100],
// type is required, must be in lower case and have one of the below values.
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
// build: changes that affect our build system or external dependencies
'build',
// chore: some minor change that doesn't fall in any of the other types
'chore',
// ci: changes to our continuous integration configuration files
'ci',
// docs: a documentation only change
'docs',
// feat: a new feature
//
// It is generally a good idea to add a implementation scope to a feature commit
// feat(c): so we can later generate implementation specific changelogs
//
// If a commit affects multiple implementations, please break it into two commits.
'feat',
// fix: a bug fix
//
// It is generally a good idea to add a implementation scope to a bug fix commit
// fix(c): so we can later generate implementation specific changelogs
//
// If a commit affects multiple implementations, please break it into two commits.
'fix',
// refactor: code change that neither fixes a bug nor adds a feature
'refactor',
// style: changes that do not affect the meaning of the code (white-space, formatting etc.)
'style',
// test: add missing tests or correct existing tests
'test',
// website content
'content'
]
],
// scope is optional, when used it must be in lower case and have one of the below values.
'scope-case': [2, 'always', 'lower-case'],
'scope-enum': [2, 'always', ['c', 'elixir', 'typescript', 'rust']],
// subject is required, must be lower case and not end in period
//
// describe your changes in the imperative-mood
// https://git.kernel.org/pub/scm/git/git.git/tree/Documentation/SubmittingPatches?id=HEAD#n135
'subject-empty': [2, 'never'],
'subject-case': [2, 'always', 'lower-case'],
'subject-full-stop': [2, 'never', '.'],
// body is optional, must be max 100 chars wide, must have a blank line before it
//
// describe your changes in the imperative-mood
// https://git.kernel.org/pub/scm/git/git.git/tree/Documentation/SubmittingPatches?id=HEAD#n135
'body-leading-blank': [2, 'always'],
'body-max-line-length': [2, 'always', 100],
// footer is optional, must be max 100 chars wide, must have a blank line before it
'footer-leading-blank': [2, 'always'],
'footer-max-line-length': [2, 'always', 100],
},
"ignores": [
(commit) => commit === '664b8f72b90c4686c513042bcd72666418953f09',
(commit) => commit === '168029387b702b9727a5d22a41281b9bb7c152a7',
(commit) => commit === '55d0acb15f70ae42b65c03323a8d84d527d43194',
(commit) => commit === 'c369514fb2d7b002e8f9785ca8bb809b8c7ccc9d',
(commit) => commit.includes("Signed-off-by: dependabot[bot] <[email protected]>")
],
};