shareable commitlint config enforcing gitmoji commit message
npm install commitlint-config-gitmoji> 🚦 Lint your gitmoji commits
[![NPM version][version-image]][version-url] [![NPM downloads][download-image]][download-url]
[version-image]: http://img.shields.io/npm/v/commitlint-config-gitmoji.svg?color=deepgreen&label=latest
[version-url]: http://npmjs.org/package/commitlint-config-gitmoji
[download-image]: https://img.shields.io/npm/dm/commitlint-config-gitmoji.svg
[download-url]: https://npmjs.org/package/commitlint-config-gitmoji
Shareable commitlint config enforcing gitmoji commit message styles. Use with commitlint .
TODO
Install dependencies
``sh`use npm
npm i -D commitlint-config-gitmoji commitlint
or
``use pnpm
pnpm i -D commitlint-config-gitmoji commitlint
Add commitlint config for Gitmoji
`sh`
echo "module.exports = {extends: ['gitmoji']};" > commitlint.config.js
the Gitmoji Structure of commit styles is below
``
:gitmoji: type(scope?): subject
body?
footer?
`
:sparkles: feat(changelog): support chinese title
:bug: fix(config): fix a subject bug
:memo: docs: update README.md
:bulb: docs(plugin): update comments
`
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: type is found in valuealways
- rule:
- value: Refer to @gitmoji/commiy-types
`sh`
echo ":abc: some message" # fails
echo ":feat: some message" # passes
#### type-case
- description: type is in case valuealways
- rule: lowerCase
- value:
`sh`
echo ":ART: Format some code" # fails
echo ":art: Format some code" # passes
#### type-empty
- condition: type is emptynever
- rule:
`sh`
echo ": some message" # fails
echo ":fire: Delete some file" # passes
#### scope-case
- condition: scope is in case valuealways
- rule: lowerCase
- value:
`sh`
echo ":art:(SCOPE) some message" # fails
echo ":art:(scope) some message" # passes
#### subject-case
- condition: subject must begin with ['sentence-case', 'start-case', 'pascal-case', 'upper-case']always
- rule:
`sh`
echo ":art:(scope) Some Message" # pass
echo ":art:(scope) some message" # Fails
#### subject-empty
- condition: subject is emptynever
- rule:
`sh`
echo ":art: " # fails
echo ":art: some message" # passes
#### subject-full-stop
- condition: subject ends with valuenever
- rule: .
- value:
`sh`
echo ":art: some message." # fails
echo ":art: some message" # passes
#### header-max-length
- condition: header has value or less charactersalways
- rule: 100
- value:
`sh``
echo ":art: some message that is way too long and breaks the line max-length by several characters" # fails
echo ":art: some message" # passes
MIT ® Arvin Xu