-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.js
More file actions
70 lines (63 loc) · 2.12 KB
/
commitlint.config.js
File metadata and controls
70 lines (63 loc) · 2.12 KB
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
// Copyright (c) 2026 Robin Mordasiewicz. MIT License.
// Commitlint configuration
// See https://commitlint.js.org/reference/configuration.html
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
// Type rules
'type-enum': [
2,
'always',
[
'feat', // New feature
'fix', // Bug fix
'docs', // Documentation only changes
'style', // Changes that don't affect meaning (whitespace, formatting)
'refactor', // Code change that neither fixes a bug nor adds a feature
'perf', // Performance improvement
'test', // Adding or correcting tests
'build', // Changes to build system or dependencies
'ci', // CI/CD configuration changes
'chore', // Other changes that don't modify src or test files
'revert', // Reverts a previous commit
'security', // Security improvements
],
],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
// Scope rules
'scope-case': [2, 'always', 'lower-case'],
'scope-enum': [
1,
'always',
[
'api', // API client changes
'auth', // Authentication changes
'commands', // Command implementations
'config', // Configuration changes
'deps', // Dependency updates
'tree', // Tree view providers
'profiles', // Profile management
'ui', // User interface changes
'utils', // Utility functions
'release', // Release related changes
],
],
// Subject rules
'subject-case': [2, 'always', 'lower-case'],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'subject-min-length': [2, 'always', 10],
'subject-max-length': [2, 'always', 72],
// Header rules
'header-max-length': [2, 'always', 100],
// Body rules
'body-leading-blank': [2, 'always'],
'body-max-line-length': [2, 'always', 100],
// Footer rules
'footer-leading-blank': [2, 'always'],
'footer-max-line-length': [2, 'always', 100],
},
// Custom help message
helpUrl: 'https://www.conventionalcommits.org/',
};