commitlint-config-gitmoji
TypeScript icon, indicating that this package has built-in type declarations

2.3.1 • Public • Published

🚦 Lint your gitmoji commits

commitlint-config-gitmoji

NPM version NPM downloads

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 commitlint

or

# use pnpm
pnpm i -D commitlint-config-gitmoji commitlint

Config

Add commitlint config for Gitmoji

echo "module.exports = {extends: ['gitmoji']};" > commitlint.config.js

Commit 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 comments

Detail 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

echo ":abc: some message" # fails
echo ":feat: some message" # passes

type-case

  • description: type is in case value
  • rule: always
  • value: lowerCase
echo ":ART: Format some code" # fails
echo ":art: Format some code" # passes

type-empty

  • condition: type is empty
  • rule: never
echo ": some message" # fails
echo ":fire: Delete some file" # passes

scope-case

  • condition: scope is in case value
  • rule: always
  • value: lowerCase
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']
  • rule: always
echo ":art:(scope) Some Message" # pass
echo ":art:(scope) some message" # Fails

subject-empty

  • condition: subject is empty
  • rule: never
echo ":art: " # fails
echo ":art: some message" # passes

subject-full-stop

  • condition: subject ends with value
  • rule: never
  • value: .
echo ":art: some message." # fails
echo ":art: some message" # passes

header-max-length

  • condition: header has value or 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" # passes

License

MIT ® Arvin Xu

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.3.129,211latest
2.3.0-beta.11beta

Version History

VersionDownloads (Last 7 Days)Published
2.3.129,211
2.3.03
2.3.0-beta.11
2.2.12-beta.21
2.2.12-beta.11
2.2.111
2.2.1027
2.2.93
2.2.860
2.2.8-beta.31
2.2.8-beta.11
2.2.71
2.2.7-beta.11
2.2.621
2.2.6-beta.11
2.2.5398
2.2.5-beta.31
2.2.5-beta.21
2.2.5-beta.11
2.2.4-beta.11
2.2.41
2.2.349
2.2.238
2.2.11
2.2.01
2.1.111
2.1.101
2.1.91
2.1.71
2.1.61
2.1.51
2.1.31
2.1.21
2.1.11
2.1.01
2.0.11
2.0.01
1.1.0703
1.0.11,145
1.0.01

Package Sidebar

Install

npm i commitlint-config-gitmoji

Weekly Downloads

31,687

Version

2.3.1

License

MIT

Unpacked Size

6.1 kB

Total Files

4

Last publish

Collaborators

  • arvinxx