-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.cjs
More file actions
63 lines (61 loc) · 1.55 KB
/
Copy pathcommitlint.config.cjs
File metadata and controls
63 lines (61 loc) · 1.55 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
const types = [
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test"
];
const scopes = [
"apps",
"cli",
"web",
"packages",
"core",
"detector",
"transformer",
"blocks",
"rate-limiter",
"repo",
"deps",
"config"
];
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"type-enum": [2, "always", types],
"scope-enum": [2, "always", scopes],
"scope-empty": [0],
"subject-empty": [2, "never"],
"subject-case": [2, "never", ["sentence-case", "start-case", "pascal-case", "upper-case"]]
},
prompt: {
questions: {
type: {
enum: {
build: { description: "Build system or external dependency changes" },
chore: { description: "Maintenance changes that do not affect behavior" },
ci: { description: "Continuous integration changes" },
docs: { description: "Documentation only changes" },
feat: { description: "A new feature" },
fix: { description: "A bug fix" },
perf: { description: "A performance improvement" },
refactor: { description: "Code changes that neither fix bugs nor add features" },
revert: { description: "Revert a previous commit" },
style: { description: "Formatting or style-only changes" },
test: { description: "Adding or updating tests" }
}
},
scope: {
enum: Object.fromEntries(
scopes.map((scope) => [scope, { description: `${scope} changes` }])
)
}
}
}
};