-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.cjs
More file actions
107 lines (107 loc) · 3.74 KB
/
commitlint.config.cjs
File metadata and controls
107 lines (107 loc) · 3.74 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
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
106
107
module.exports = {
extends: ['@commitlint/config-conventional', 'gitmoji'],
rules: {
// Define allowed commit types
'type-enum': [
2, // error level
'always',
[
'feat', // new feature
'fix', // bug fix
'docs', // documentation changes
'style', // code style changes (no impact on functionality)
'refactor', // code refactoring
'perf', // performance improvements
'test', // test additions/modifications
'build', // build system changes
'ci', // CI/CD configuration changes
'chore', // other tasks
'revert', // revert previous commit
'init', // initial setup
],
],
'subject-case': [0], // disable subject case rules (allow emoji usage)
'subject-empty': [0], // allow empty subject (due to gitmoji code)
'type-empty': [0], // allow empty type (due to gitmoji code)
'start-with-gitmoji': [2, 'always'], // enforce gitmoji at the beginning
},
prompt: {
questions: {
type: {
description: 'What type of change are you making to the codebase?',
enum: {
feat: {
description: 'Adding a new feature or capability to the application',
title: 'Features',
emoji: '✨',
},
fix: {
description: 'Resolving a bug or issue that was causing problems',
title: 'Bug Fixes',
emoji: '🐛',
},
docs: {
description: 'Updating documentation, comments, or README files',
title: 'Documentation',
emoji: '📄',
},
style: {
description: 'Formatting code, fixing whitespace, or adjusting styling without changing functionality',
title: 'Styles',
emoji: '🎨',
},
refactor: {
description: 'Restructuring existing code to improve readability or maintainability',
title: 'Code Refactoring',
emoji: '📦',
},
perf: {
description: 'Optimizing code execution speed, memory usage, or resource consumption',
title: 'Performance Improvements',
emoji: '🚀',
},
test: {
description: 'Adding new test cases, fixing existing tests, or improving test coverage',
title: 'Tests',
emoji: '🚨',
},
build: {
description: 'Modifying build tools, dependencies, or deployment configuration',
title: 'Builds',
emoji: '🔨',
},
ci: {
description: 'Updating continuous integration workflows, GitHub Actions, or deployment scripts',
title: 'Continuous Integrations',
emoji: '🔧',
},
chore: {
description: 'Routine maintenance tasks, dependency updates, or configuration changes',
title: 'Chores',
emoji: '📝',
},
revert: {
description: 'Undoing a previous commit that introduced issues or unwanted changes',
title: 'Reverts',
emoji: '🗑',
},
init: {
description: 'Setting up the project structure, initial configuration, or boilerplate code',
title: 'Initialization',
emoji: '🎉',
},
},
},
scope: {
description:
'Which part of the codebase is affected by this change? (e.g., component name, file path, or module)',
},
subject: {
description: 'Provide a concise summary of what this change accomplishes',
},
body: {
description: 'Explain the reasoning behind this change and any important details (optional)',
},
},
},
};