-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.cjs
More file actions
60 lines (58 loc) · 1.27 KB
/
commitlint.config.cjs
File metadata and controls
60 lines (58 loc) · 1.27 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
"use strict";
const RELEASE_HEADER_RE = /^chore\(release\):/i;
/** @type {import('@commitlint/types').UserConfig} */
module.exports = {
extends: ["@commitlint/config-conventional"],
// semantic-release/@semantic-release/git: release commits can include a long changelog in the body
ignores: [
(message) => {
const header = message.split("\n")[0]?.trim() ?? "";
return RELEASE_HEADER_RE.test(header) || header.includes("[skip ci]");
},
],
rules: {
"body-max-length": [2, "always", 1000],
"body-max-line-length": [2, "always", 200],
"scope-enum": [
2,
"always",
[
// Apps & packages
"web",
"portal",
"chat",
"bridge",
"tools",
"docs",
"ui",
// Infrastructure & ops
"infra",
"pubnix",
// Tooling & repo-wide
"deps",
"scripts",
"tests",
"config",
"ci",
],
],
"subject-case": [2, "never", ["start-case", "pascal-case", "upper-case"]],
"type-enum": [
2,
"always",
[
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"build",
"ci",
"chore",
"revert",
],
],
},
};