2.3.1 • Published 1 year ago

commitlint-config-gitmoji v2.3.1

Weekly downloads
2,718
License
MIT
Repository
github
Last release
1 year ago

🚦 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

2.3.0

1 year ago

2.3.0-beta.1

1 year ago

2.3.1

1 year ago

2.2.11

1 year ago

2.2.12-beta.1

1 year ago

2.2.12-beta.2

1 year ago

2.2.7

1 year ago

2.2.10

1 year ago

2.2.9

1 year ago

2.2.8

1 year ago

2.2.8-beta.3

1 year ago

2.2.8-beta.1

1 year ago

2.2.7-beta.1

1 year ago

2.2.6

2 years ago

2.2.6-beta.1

2 years ago

2.2.5

3 years ago

2.2.4

3 years ago

2.2.5-beta.1

3 years ago

2.2.5-beta.2

3 years ago

2.2.5-beta.3

3 years ago

2.2.4-beta.1

3 years ago

2.2.3

3 years ago

2.2.2

3 years ago

2.2.1

3 years ago

2.2.0

3 years ago

2.1.11

3 years ago

2.1.10

3 years ago

2.1.9

3 years ago

2.1.7

3 years ago

2.1.6

3 years ago

2.1.3

3 years ago

2.1.5

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.0

3 years ago

1.0.1

6 years ago

1.0.0

6 years ago