-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcommitlint.config.cjs
More file actions
86 lines (85 loc) · 2.22 KB
/
Copy pathcommitlint.config.cjs
File metadata and controls
86 lines (85 loc) · 2.22 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
/** @type {import('@commitlint/types').UserConfig} */
const config = {
extends: ["@commitlint/config-conventional"],
rules: {
// Type must be one of the following
"type-enum": [
2,
"always",
[
"feat", // New feature
"fix", // Bug fix
"docs", // Documentation only changes
"style", // Code style (formatting, semicolons, etc)
"refactor", // Code refactoring (no feature/fix)
"perf", // Performance improvements
"test", // Adding or updating tests
"build", // Build system or external dependencies
"ci", // CI configuration
"chore", // Other changes (maintenance)
"revert", // Revert a previous commit
"wip", // Work in progress
],
],
// Scope can be any of the monorepo packages/apps/services
"scope-enum": [
1, // Warning level (not error)
"always",
[
// Apps
"web",
"landing",
"api-gateway",
"storybook",
"design-docs",
"studio",
// Packages
"ui",
"db",
"theme",
"tokens",
"icons",
"brand",
"rate-limit",
"cache",
"event-bus",
"saga",
"mcp",
"errors",
"logger",
"alerting",
"analytics",
"billing",
"audit",
"preset",
"contracts",
// Services
"ai",
// Infrastructure
"infra",
"inngest",
"supabase",
// Other
"deps",
"release",
"config",
],
],
// Subject should not be empty
"subject-empty": [2, "never"],
// Subject should not end with period
"subject-full-stop": [2, "never", "."],
// Subject case should be lowercase
"subject-case": [2, "always", "lower-case"],
// Type should not be empty
"type-empty": [2, "never"],
// Type case should be lowercase
"type-case": [2, "always", "lower-case"],
// Header max length
"header-max-length": [2, "always", 100],
// Body max line length
"body-max-line-length": [1, "always", 200],
},
helpUrl: "https://github.com/conventional-changelog/commitlint/#what-is-commitlint",
};
module.exports = config;