Presets
Gitmoji
An emoji or :shortcode: intention, alone or in front of another preset.
Usage
Implements Gitmoji.
extends = "npm:@atypical/commit/gitmoji"Slots
| Slot | Shape | Required |
|---|---|---|
intention | One of emoji (symbols) or shortcode (: :), with a gap | Yes |
scope | ( ), any | No |
separator | symbol :, tight | No |
Examples
| Header | Result |
|---|---|
✨ Add a feature | Valid |
:sparkles: Add a feature | Valid |
🐛 (auth): Fix a bug | Valid |
✨: Add a feature | Valid |
:t-rex: Add old code | Valid |
feat: no intention | Invalid: no intention |
✨:bug: both forms | Invalid: two forms |
:bogus: x | Invalid: unknown shortcode |
✨(auth): x | Invalid: the scope needs the space |
Layered on Conventional Commits
extends = ["npm:@atypical/commit/conventional", "npm:@atypical/commit/gitmoji"]| Header | Result |
|---|---|
✨ feat(api): add an endpoint | Valid |
🐛 fix(api)!: drop the v1 routes | Valid |
✨ nope: unknown keyword | Invalid: unknown keyword |
feat(api): no emoji | Invalid: no intention |
The reverse extends order builds a different grammar; see
Merging.
Source
- Generated by
scripts/gitmoji.tsfrom the gitmoji API. - Shortcodes containing characters a delimited slot cannot read are dropped; their emoji are kept.
- Emoji are listed with the variation selectors the catalogue uses.
⚡️(U+26A1 U+FE0F) matches;⚡(U+26A1) does not.