forked from Maratang-4zo/jamjam
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitlint.config.ts
More file actions
80 lines (71 loc) · 2.38 KB
/
commitlint.config.ts
File metadata and controls
80 lines (71 loc) · 2.38 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
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
/**
* @summary Commit Message에 대한 규칙을 정의합니다.
* @see https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional
*
* 아래는 Commit Message의 형식을 정의한 것입니다.
* - Type(필수): Commit의 종류. commit을 할 때, type에 상응하는 이모지가 자동으로 붙습니다.
* (Feat, Fix, Style, Refactor, Design, Comment, Chore, Docs, Hotfix, Test, Init)
* - Scope(선택): Commit의 범위. 기능, 함수, 페이지, API 등 자유롭게 선택할 수 있습니다.
* - Subject(필수): Commit의 제목. 되도록 간결하게 작성하고, 명사형 어미로 끝나도록 합니다.
* - Body(선택): Commit의 내용. 어떤 이유로, 어떻게 변경했는지 작성합니다.
* - Footer(자동): Issue Tracker ID가 자동으로 삽입됩니다. Branch 이름이 issue<id>- 형식이어야 합니다.
*
* @example
* - ✨Feat: 로그인 기능 추가
* - ✨Feat(login/SignUp): 회원가입 기능 추가
* - 🧠Fix: 로그인 기능 수정
* - ⭐️Style: 로그인 페이지 디자인 변경
*/
/*
<type>(optional scope): <subject>
[optional body]
[optional footer(s)]
*/
const Configuration = {
extends: ["git-commit-emoji"],
rules: {
//* Type
"type-enum": [
2,
"always",
[
"✨ Feat",
"🔨 Fix",
"⭐️ Style",
"🧠 Refactor",
"🎨 Design",
"🏷 Comment",
"🍎 Chore",
"📝 Docs",
"🔥 Hotfix",
"🧪 Test",
"🎉 Init",
],
],
"type-case": [2, "always", "start-case"],
"type-empty": [2, "never"],
//* Scope
"scope-case": [2, "never", []],
//* Subject
"subject-full-stop": [2, "never", "."],
"subject-exclamation-mark": [2, "never", "!"],
"subject-case": [2, "never", []],
"subject-empty": [2, "never"],
//* Body & Footer
"body-leading-blank": [1, "always"],
"body-max-line-length": [2, "always", 100],
"footer-leading-blank": [1, "always"],
"footer-max-line-length": [2, "always", 100],
},
prompt: {},
ignores: [
(message: string) =>
message.startsWith("Merge") ||
message.startsWith("Revert") ||
message.startsWith("Amend") ||
message.startsWith("Reset") ||
message.startsWith("Rebase") ||
message.startsWith("Tag"),
],
};
module.exports = Configuration;