-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.ts
More file actions
26 lines (22 loc) · 811 Bytes
/
commitlint.config.ts
File metadata and controls
26 lines (22 loc) · 811 Bytes
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
// ref: https://commitlint.js.org/reference/configuration.html
import conventionalConfig from "@commitlint/config-conventional";
import type { UserConfig } from "@commitlint/types";
const excludeQuestions: string[] = [
// exclude isIssueAffected, issuesBody, and issues because I link branches to issues using GitHub
"isIssueAffected",
"issuesBody",
"issues",
] satisfies (keyof typeof conventionalConfig.prompt.questions)[];
const commitlintConfig: UserConfig = {
// do not use extends because we cannot exclude properties from the parent
...conventionalConfig,
prompt: {
...conventionalConfig.prompt,
questions: Object.fromEntries(
Object.entries(conventionalConfig.prompt.questions).filter(
([key]) => !excludeQuestions.includes(key),
),
),
},
};
export default commitlintConfig;