-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommitlint.config.js
41 lines (36 loc) · 1.23 KB
/
commitlint.config.js
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
/**
*
* Commit messages must respect pattern:
* """
* type(scope?): subject
* body?
* footer?
* """
* Example: feat(dashboardAtlas): Add new awesome feature to dashboard
* Note: "BREAKING CHANGE" can be added to specify a breaking change (major version number needs to be incremented)
*
*
* Types or scopes can be added in ajcfConventionalCommit.json file, in camelCase
*
* See more information here :
* https://www.conventionalcommits.org/en/v1.0.0-beta.2/
* https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional
* https://commitlint.js.org/#/reference-rules
*
*
*/
// eslint-disable-next-line @typescript-eslint/no-var-requires
const ajcfConventionalCommit = require("./ajcfConventionalCommit.json");
const typesEnum = Object.keys(ajcfConventionalCommit.types);
const scopesEnum = Object.keys(ajcfConventionalCommit.commonScopes);
module.exports = {
extends: ["@commitlint/config-conventional"],
rules: {
"type-enum": [2, "always", typesEnum],
"scope-case": [2, "always", ["camel-case"]],
"scope-enum": [2, "always", scopesEnum],
"subject-empty": [2, "never"],
"subject-case": [0, "always", ["lower-case"]],
"header-max-length": [0, "always", 72],
},
};