-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.js
More file actions
35 lines (35 loc) · 1.03 KB
/
Copy pathcommitlint.config.js
File metadata and controls
35 lines (35 loc) · 1.03 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
/**
* Commitlint configuration
* @see https://commitlint.js.org/
*/
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
// Type must be one of these values
'type-enum': [
2,
'always',
[
'feat', // New feature
'fix', // Bug fix
'docs', // Documentation only
'refactor', // Code restructure, no behavior change
'chore', // Maintenance, backlog updates, config
'test', // Adding or updating tests
'ci', // CI/CD configuration
],
],
// Type is required
'type-empty': [2, 'never'],
// Subject is required
'subject-empty': [2, 'never'],
// Subject must be sentence case (first letter uppercase)
'subject-case': [2, 'always', 'sentence-case'],
// No period at end of subject
'subject-full-stop': [2, 'never', '.'],
// Header max length
'header-max-length': [2, 'always', 72],
// Scope should be lowercase with hyphens
'scope-case': [2, 'always', 'kebab-case'],
},
};