-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcommitlint.config.ts
More file actions
113 lines (110 loc) · 2.53 KB
/
commitlint.config.ts
File metadata and controls
113 lines (110 loc) · 2.53 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
108
109
110
111
112
113
import type { UserConfig } from "@commitlint/types";
import { RuleConfigSeverity } from "@commitlint/types";
const RELEASE_HEADER_RE = /^chore\(release\):/i;
const config: UserConfig = {
extends: ["@commitlint/config-conventional"],
// semantic-release/@semantic-release/git: release commits can include a long changelog in the body
ignores: [
(message: string) => {
const header = message.split("\n")[0]?.trim() ?? "";
return RELEASE_HEADER_RE.test(header) || header.includes("[skip ci]");
},
],
rules: {
"body-max-length": [RuleConfigSeverity.Error, "always", 1000],
"body-max-line-length": [RuleConfigSeverity.Error, "always", 200],
"scope-enum": [
RuleConfigSeverity.Error,
"always",
[
// Apps
"web",
"portal",
"portal/auth",
"portal/db",
"portal/api",
"portal/admin",
"portal/email",
"portal/seo",
"portal/i18n",
"chat-web",
"docs",
"bridge",
"bridge/irc",
"bridge/xmpp",
"bridge/discord",
"tools-web",
// Packages
"ui",
"discord",
"fibery",
"tools-manifest",
// Services
"chat",
"chat/irc",
"chat/xmpp",
"tools",
"network",
"network/dns",
"network/turn",
"network/uptime",
"network/sftp",
"observability",
"observability/grafana",
"observability/loki",
"observability/alloy",
// Infrastructure & ops
"infra",
"infra/chat",
"infra/network",
"infra/observability",
"infra/tools",
"nginx",
"docker",
"pubnix",
"pubnix/ansible",
"pubnix/terraform",
"pubnix/skel",
// Org & governance
"org",
"org/brand",
"org/governance",
"org/policies",
"org/security",
"security",
// Tooling & repo-wide
"deps",
"scripts",
"tests",
"config",
"lint",
"ci",
"release",
"agents",
],
],
"subject-case": [
RuleConfigSeverity.Error,
"never",
["start-case", "pascal-case", "upper-case"],
],
"type-enum": [
RuleConfigSeverity.Error,
"always",
[
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"build",
"ci",
"chore",
"revert",
],
],
},
};
export default config;