forked from PerformanC/NodeLink
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.mjs
More file actions
35 lines (30 loc) · 971 Bytes
/
commitlint.config.mjs
File metadata and controls
35 lines (30 loc) · 971 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
// commitlint.config.js
export default {
extends: ['@commitlint/config-conventional'],
rules: {
// 1. Enforce your specific commit types
'type-enum': [
2,
'always',
[
'add',
'update',
'remove',
'fix',
'improve',
]
],
// 2. Enforce lowercase types (e.g., 'add' not 'Add')
'type-case': [2, 'always', 'lowercase'],
// 3. Disable scopes (Your example is "type: desc", not "type(scope): desc")
'scope-empty': [2, 'always'],
// 4. Ensure there is a subject (description)
'subject-empty': [2, 'never'],
// 5. Ensure the subject does not end with a period
'subject-full-stop': [2, 'never', '.'],
// 6. Max length of the header (72 is standard for git legibility)
'header-max-length': [2, 'always', 72],
},
ignores: [(commit) => commit === ""],
defaultIgnores: true,
};