You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/examples.md
+129Lines changed: 129 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,3 +22,132 @@ These examples show common usages of how commitlint can be configured.
22
22
// ...
23
23
}
24
24
```
25
+
26
+
:::
27
+
28
+
## Customizing Emojis and Alignment in VS Code
29
+
30
+
Some terminals have trouble correctly calculating the width of Unicode emojis, which can cause a missing space after the emoji, leading to misaligned text in the commit prompt.
// Add a space to a few common types for better alignment.
49
+
build: {
50
+
emoji: "🛠️ ", // The extra space fixes the alignment.
51
+
},
52
+
chore: {
53
+
emoji: "♻️ ",
54
+
},
55
+
ci: {
56
+
emoji: "⚙️ ",
57
+
},
58
+
revert: {
59
+
emoji: "🗑️ ",
60
+
},
61
+
},
62
+
},
63
+
},
64
+
},
65
+
} satisfiesUserConfig;
66
+
```
67
+
68
+
:::
69
+
70
+
## Include Emojis in Commit Messages
71
+
72
+
By default, emojis are only shown in the commit message prompt. To include them in the actual commit header, you need a custom parser and a setting to enable them.
73
+
74
+
This configuration is based on the conventional commit rules and uses a _parser preset_ to validate commit headers that start with an emoji.
0 commit comments