-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.mjs
More file actions
48 lines (48 loc) · 1.27 KB
/
commitlint.config.mjs
File metadata and controls
48 lines (48 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
/** @type {import('@commitlint/types').UserConfig} */
export default {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-enum': [
2,
'always',
[
'core',
'cli',
'mcp',
'skills',
'schema-std',
'code-graph',
'specd',
'plugin-manager',
'plugin-agent-claude',
'plugin-agent-copilot',
'plugin-agent-codex',
'plugin-agent-opencode',
'plugin-agent-standard',
'public-web',
'root',
'all',
],
],
'subject-case': [2, 'always', 'lower-case'],
'header-max-length': [2, 'always', 72],
'body-max-line-length': [2, 'always', 100],
'no-ai-coauthor': [2, 'always'],
},
plugins: [
{
rules: {
'no-ai-coauthor': ({ raw }) => {
const forbidden = ['@anthropic.com', '@openai.com']
const coAuthorLines = raw
.split('\n')
.filter((line) => line.toLowerCase().startsWith('co-authored-by:'))
const hasAiCoauthor = coAuthorLines.some((line) =>
forbidden.some((domain) => line.toLowerCase().includes(domain.toLowerCase())),
)
return [!hasAiCoauthor, 'Commit must not include AI co-author trailers']
},
},
},
],
}