This repository has been archived by the owner on Dec 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
commitlint.config.js
89 lines (88 loc) · 1.72 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
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
const gitmojis = [
":art:",
":zap:",
":fire:",
":bug:",
":ambulance:",
":sparkles:",
":pencil:",
":rocket:",
":lipstick:",
":tada:",
":white_check_mark:",
":lock:",
":apple:",
":penguin:",
":checkered_flag:",
":robot:",
":green_apple:",
":bookmark:",
":rotating_light:",
":construction:",
":green_heart:",
":arrow_down:",
":arrow_up:",
":pushpin:",
":construction_worker:",
":chart_with_upwards_trend:",
":recycle:",
":whale:",
":heavy_plus_sign:",
":heavy_minus_sign:",
":wrench:",
":globe_with_meridians:",
":pencil2:",
":poop:",
":rewind:",
":twisted_rightwards_arrows:",
":package:",
":alien:",
":truck:",
":page_facing_up:",
":boom:",
":bento:",
":ok_hand:",
":wheelchair:",
":bulb:",
":beers:",
":speech_balloon:",
":card_file_box:",
":loud_sound:",
":mute:",
":busts_in_silhouette:",
":children_crossing:",
":building_construction:",
":iphone:",
":clown_face:",
":egg:",
":see_no_evil:",
":camera_flash:",
":alembic:",
":mag:",
":wheel_of_dharma:",
":label:",
":book:",
":heart:",
":cn:",
":kr:"
];
module.exports = {
rules: {
"type-enum": [1, "always", gitmojis],
"header-max-length": [1, "always", 100],
"body-leading-blank": [2, "always"],
"footer-leading-blank": [2, "always"],
"scope-case": [1, "always", "lower-case"],
"subject-case": [1, "always", ["sentence-case"]],
"subject-empty": [2, "never"],
"subject-full-stop": [2, "never", ["."]],
"type-case": [2, "always", "lower-case"],
"type-empty": [2, "never"]
},
parserPreset: {
parserOpts: {
headerPattern: /^(:\w*:)(?:\s*(.*):)? (.*)$/,
headerCorrespondence: ["type", "scope", "subject"]
}
}
};