Conventional Changelog with Emojis support π
yarn add --dev @favoloso/conventional-changelog-emoji
or
npm install --save-dev @favoloso/conventional-changelog-emoji
conventional-changelog -p @favoloso/emoji -i CHANGELOG.md -s
You can use conventional-changelog
plugin (v11+) with the
@favoloso/emoji
preset.
"release-it": {
"plugins": {
"@release-it/conventional-changelog": {
"preset": "@favoloso/emoji",
"infile": "CHANGELOG.md"
}
}
}
This package provides an additional bin script emoji-commit-lint
.
The scripts lints and eventually changes commit messages, from traditional conventional changelog
format (i.e. feat: Add a magic feature
) to corresponding emoji (i.e. β¨ Add a magic feature
),
checks and applies correct casing (i.e. lower-case
) and many more, as configured
by Linter Rules.
To use it, install husky
yarn add --dev husky
Now in your package.json add:
{
"husky": {
"hooks": {
"commit-msg": "emoji-commit-lint"
}
}
}
Now linter will check your commits. Any commit like <type>: <msg>
will be automatically
transformed with related emoji. See Available Emojis to see available types.
The package works as-is, but its behaviour may be customized with the following options.
Note: This package supports
cosmiconfig
to provide configuration options withfavolosoEmoji
module name.
-
emojis
(default:{}
)An object allowing you to customize conventional-changelog types used (as Available Emojis table).
You should provide an object, where the key is the
type
you want to edit (or add), and the value is the updated configuration. Configurations will be merged with originals if existing.See the Custom Emoji wiki page for further details.
-
rules
(default:{}
)Allows to customize linter rules. See the Linter Rules wiki page for further details.
-
showEmojiPerCommit
(default:false
)In the changelog, shows emoji for each commit. In the default mode (
false
), emojis are omitted from commits and only the heading contains them (i.e.π Bug Fixes
) -
minorForBreakingInDevelopment
(default:true
)Breaking changes during development will be considered as minor instead of major bumps (see semver spec).
- Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable.
-
language
(default:en
)Allows to translate commits group heading in
CHANGELOG.md
(i.e.π Bug Fixes
) and in linter messages. Languages available:en
,it
{
"favolosoEmoji": {
"showEmojiPerCommit": false
}
}
Emoji | Aliases | Type | Type Aliases | Version Bump | In Changelog? | Heading | Order |
---|---|---|---|---|---|---|---|
π¨ | breaking |
major | β | π¨ Breaking Changes | 10 | ||
β¨ | π, π«, π | feat |
minor | β | β¨ Features | 20 | |
π | security |
patch | β | π Security | 25 | ||
π | improvement |
imp |
patch | β | π Improvements | 30 | |
β‘οΈ | perf |
performance |
patch | β | β‘οΈ Performance | 35 | |
π | π | fix |
patch | β | π Bug Fixes | 40 | |
π | π | docs |
doc |
patch | β | π Documentation | 50 |
π | βοΈ | chore |
chores |
patch | β | π Chore | 60 |
β»οΈ | refactor |
patch | β»οΈ Refactoring | 90 | |||
π¦ | β | test |
patch | π¦ Test | 90 | ||
π¨ | π | style |
cleanup |
patch | π¨ Style | 90 | |
π¦ | build |
deps |
patch | π¦ Build | 90 | ||
π | release |
patch | π Release | 90 | |||
π§ | wip |
patch | π§ Wip | 90 |