-
Notifications
You must be signed in to change notification settings - Fork 0
/
commitlint.config.ts
39 lines (35 loc) · 1.19 KB
/
commitlint.config.ts
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
import { RuleConfigSeverity } from "@commitlint/types";
import type { UserConfig as CommitlintUserConfig } from "@commitlint/types";
// TODO extract to dedicated repo with unit tests (test different commit message inputs)
/**
* `commitlint` configuration.
* @see https://commitlint.js.org/#/reference-configuration
*/
const commitlintConfig: CommitlintUserConfig = {
extends: ["@commitlint/config-conventional"],
// whether to use default ignore rules
defaultIgnores: true,
// rule overrides
rules: {
// specify valid types
"type-enum": [
RuleConfigSeverity.Error,
"always",
[
"build", // build system, dependencies, tooling
"chore", // maintenance
"ci", // continuous integration
"docs", // update documentation
"feat", // add a new "feature
"feature", // add a feature
"fix", // fix a bug
"perf", // performance improvement
"refactor", // change project/code structure
// "revert", // revert a commit (intentionally omitted)
"style", // formatting, visual changes
"test", // update tests (unit, integration, E2E, etc.)
],
],
},
};
export default commitlintConfig;