commitlint-config-gitmoji v2.3.1
🚦 Lint your gitmoji commits
commitlint-config-gitmoji
Shareable commitlint config enforcing gitmoji commit message styles. Use with commitlint .
Demo
TODO
Getting started
Install
Install dependencies
# use npm
npm i -D commitlint-config-gitmoji commitlintor
# use pnpm
pnpm i -D commitlint-config-gitmoji commitlintConfig
Add commitlint config for Gitmoji
echo "module.exports = {extends: ['gitmoji']};" > commitlint.config.jsCommit style
Structure
the Gitmoji Structure of commit styles is below
:gitmoji: type(scope?): subject
body?
footer?Example
:sparkles: feat(changelog): support chinese title
:bug: fix(config): fix a subject bug
:memo: docs: update README.md
:bulb: docs(plugin): update commentsDetail Rules
Problems
The following rules are considered problems for gitmoji commit and will yield a non-zero exit code when not met.
Consult docs/rules for a list of available rules.
type-enum
- condition:
typeis found in value - rule:
always - value: Refer to @gitmoji/commiy-types
echo ":abc: some message" # fails
echo ":feat: some message" # passestype-case
- description:
typeis in casevalue - rule:
always - value:
lowerCase
echo ":ART: Format some code" # fails
echo ":art: Format some code" # passestype-empty
- condition:
typeis empty - rule:
never
echo ": some message" # fails
echo ":fire: Delete some file" # passesscope-case
- condition:
scopeis in casevalue - rule:
always - value:
lowerCase
echo ":art:(SCOPE) some message" # fails
echo ":art:(scope) some message" # passessubject-case
- condition:
subjectmust begin with['sentence-case', 'start-case', 'pascal-case', 'upper-case'] - rule:
always
echo ":art:(scope) Some Message" # pass
echo ":art:(scope) some message" # Failssubject-empty
- condition:
subjectis empty - rule:
never
echo ":art: " # fails
echo ":art: some message" # passessubject-full-stop
- condition:
subjectends withvalue - rule:
never - value:
.
echo ":art: some message." # fails
echo ":art: some message" # passesheader-max-length
- condition:
headerhasvalueor less characters - rule:
always - value:
100
echo ":art: some message that is way too long and breaks the line max-length by several characters" # fails
echo ":art: some message" # passesLicense
MIT ® Arvin Xu
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
8 years ago
8 years ago