1 |
rakinar2 |
575 |
import { RuleConfigSeverity, type UserConfig } from "@commitlint/types"; |
2 |
|
|
|
3 |
|
|
const config: UserConfig = { |
4 |
|
|
extends: ["@commitlint/config-conventional"], |
5 |
|
|
parserPreset: "conventional-changelog-angular", |
6 |
|
|
rules: { |
7 |
|
|
"type-enum": [ |
8 |
|
|
RuleConfigSeverity.Error, |
9 |
|
|
"always", |
10 |
|
|
[ |
11 |
|
|
"feat", |
12 |
|
|
"fix", |
13 |
|
|
"docs", |
14 |
|
|
"style", |
15 |
|
|
"refactor", |
16 |
|
|
"perf", |
17 |
|
|
"test", |
18 |
|
|
"chore", |
19 |
|
|
"revert", |
20 |
|
|
"build", |
21 |
|
|
"ci", |
22 |
|
|
"release", |
23 |
|
|
"deps", |
24 |
|
|
"security", |
25 |
|
|
"i18n" |
26 |
|
|
] |
27 |
|
|
], |
28 |
|
|
"signed-off-by": [RuleConfigSeverity.Error, "always", "Signed-off-by: "], |
29 |
|
|
"body-max-length": [RuleConfigSeverity.Error, "always", 1024] |
30 |
|
|
}, |
31 |
|
|
prompt: { |
32 |
|
|
settings: {}, |
33 |
|
|
messages: { |
34 |
|
|
skip: ":skip", |
35 |
|
|
max: "upper %d chars", |
36 |
|
|
min: "%d chars at least", |
37 |
|
|
emptyWarning: "can not be empty", |
38 |
|
|
upperLimitWarning: "over limit", |
39 |
|
|
lowerLimitWarning: "below limit" |
40 |
|
|
}, |
41 |
|
|
questions: { |
42 |
|
|
type: { |
43 |
|
|
description: "Select the type of change that you're committing:", |
44 |
|
|
enum: { |
45 |
|
|
feat: { |
46 |
|
|
title: "Features", |
47 |
|
|
description: "A new feature", |
48 |
|
|
emoji: "✨" |
49 |
|
|
}, |
50 |
|
|
fix: { |
51 |
|
|
title: "Bug Fixes", |
52 |
|
|
description: "A bug fix", |
53 |
|
|
emoji: "🐛" |
54 |
|
|
}, |
55 |
|
|
docs: { |
56 |
|
|
title: "Documentation", |
57 |
|
|
description: "Documentation only changes", |
58 |
|
|
emoji: "📚" |
59 |
|
|
}, |
60 |
|
|
style: { |
61 |
|
|
title: "Styles", |
62 |
|
|
description: |
63 |
|
|
"Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)", |
64 |
|
|
emoji: "💎" |
65 |
|
|
}, |
66 |
|
|
refactor: { |
67 |
|
|
title: "Code Refactoring", |
68 |
|
|
description: "A code change that neither fixes a bug nor adds a feature", |
69 |
|
|
emoji: "📦" |
70 |
|
|
}, |
71 |
|
|
perf: { |
72 |
|
|
title: "Performance Improvements", |
73 |
|
|
description: "A code change that improves performance", |
74 |
|
|
emoji: "🚀" |
75 |
|
|
}, |
76 |
|
|
test: { |
77 |
|
|
title: "Tests", |
78 |
|
|
description: "Adding missing tests or correcting existing tests", |
79 |
|
|
emoji: "🚨" |
80 |
|
|
}, |
81 |
|
|
build: { |
82 |
|
|
title: "Builds", |
83 |
|
|
description: |
84 |
|
|
"Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)", |
85 |
|
|
emoji: "🛠" |
86 |
|
|
}, |
87 |
|
|
ci: { |
88 |
|
|
title: "Continuous Integrations", |
89 |
|
|
description: |
90 |
|
|
"Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)", |
91 |
|
|
emoji: "⚙️" |
92 |
|
|
}, |
93 |
|
|
chore: { |
94 |
|
|
title: "Chores", |
95 |
|
|
description: "Other changes that don't modify src or test files", |
96 |
|
|
emoji: "♻️" |
97 |
|
|
}, |
98 |
|
|
revert: { |
99 |
|
|
title: "Reverts", |
100 |
|
|
description: "Reverts a previous commit", |
101 |
|
|
emoji: "🗑" |
102 |
|
|
}, |
103 |
|
|
release: { |
104 |
|
|
title: "Release", |
105 |
|
|
description: "Create a release commit", |
106 |
|
|
emoji: "🔖" |
107 |
|
|
}, |
108 |
|
|
deps: { |
109 |
|
|
title: "Dependencies", |
110 |
|
|
description: "Update dependencies", |
111 |
|
|
emoji: "📦" |
112 |
|
|
}, |
113 |
|
|
security: { |
114 |
|
|
title: "Security", |
115 |
|
|
description: "Fix a security issue", |
116 |
|
|
emoji: "🔒" |
117 |
|
|
}, |
118 |
|
|
i18n: { |
119 |
|
|
title: "Internationalization", |
120 |
|
|
description: "Internationalization or localization changes", |
121 |
|
|
emoji: "🌐" |
122 |
|
|
} |
123 |
|
|
} |
124 |
|
|
}, |
125 |
|
|
scope: { |
126 |
|
|
description: "What is the scope of this change (e.g. component or file name)" |
127 |
|
|
}, |
128 |
|
|
subject: { |
129 |
|
|
description: "Write a short, imperative tense description of the change" |
130 |
|
|
}, |
131 |
|
|
body: { |
132 |
|
|
description: "Provide a longer description of the change" |
133 |
|
|
}, |
134 |
|
|
isBreaking: { |
135 |
|
|
description: "Are there any breaking changes?" |
136 |
|
|
}, |
137 |
|
|
breakingBody: { |
138 |
|
|
description: |
139 |
|
|
"A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself" |
140 |
|
|
}, |
141 |
|
|
breaking: { |
142 |
|
|
description: "Describe the breaking changes" |
143 |
|
|
}, |
144 |
|
|
isIssueAffected: { |
145 |
|
|
description: "Does this change affect any open issues?" |
146 |
|
|
}, |
147 |
|
|
issuesBody: { |
148 |
|
|
description: |
149 |
|
|
"If issues are closed, the commit requires a body. Please enter a longer description of the commit itself" |
150 |
|
|
}, |
151 |
|
|
issues: { |
152 |
|
|
description: 'Add issue references (e.g. "fix #123", "re #123".)' |
153 |
|
|
} |
154 |
|
|
} |
155 |
|
|
} |
156 |
|
|
}; |
157 |
|
|
|
158 |
|
|
export default config; |