-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathcommitlint.config.ts
More file actions
99 lines (91 loc) · 2.15 KB
/
Copy pathcommitlint.config.ts
File metadata and controls
99 lines (91 loc) · 2.15 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
import type { UserConfig } from "@commitlint/types";
/**
* commitlint configuration for TrustLend.
*
* Extends `@commitlint/config-conventional` with additional scopes and types
* relevant to the project's stack (Soroban, Stellar, Next.js, Neon).
*
* Conventional commit format:
* <type>(<scope>): <subject>
* <BLANK LINE>
* <body>
* <BLANK LINE>
* <footer>
*/
const Configuration: UserConfig = {
extends: ["@commitlint/config-conventional"],
// Additional types beyond the conventional ones (feat, fix, docs, style,
// refactor, perf, test, build, ci, chore, revert)
rules: {
"type-enum": [
2,
"always",
[
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"build",
"ci",
"chore",
"revert",
// Soroban-specific: smart-contract logic changes
"contract",
// Blockchain/Stellar related changes (not smart-contracts)
"stellar",
// Security-related changes
"security",
],
],
// Allow scopes relevant to the monorepo structure
"scope-enum": [
2,
"always",
[
"lending",
"escrow",
"governance",
"default-management",
"multisig-admin",
"borrower-reputation",
"auto-compound-vault",
"treasury",
"contracts",
"frontend",
"dashboard",
"auth",
"kyc",
"api",
"ci",
"db",
"neon",
"drizzle",
"stellar",
"soroban",
"docs",
"deps",
"config",
"landing",
"hooks",
],
],
// Subject must not be empty
"subject-empty": [2, "never"],
// Subject must not end with a period
"subject-full-stop": [2, "never", "."],
// Header max length
"header-max-length": [2, "always", 100],
},
// Allow both lowercase and uppercase types at the prompt level
// (conventional commits are case-insensitive for the type)
prompt: {
settings: {
enableMultipleScopes: true,
scopeEnumSeparator: ",",
},
},
};
export default Configuration;