commitlint-config-gitmoji-monorepo

1.1.3 • Public • Published

commitlint-config-gitmoji-monorepo

NPM version NPM downloads

Demo

TODO

Getting started

Install

Install dependencies

# use npm
npm i -D commitlint-config-gitmoji-monorepo commitlint

or

# use yarn
yarn add -D commitlint-config-gitmoji-monorepo commitlint

Config

Add commitlint config

echo "module.exports = {extends: ['gitmoji-monorepo']};" > .commitlintrc.js

Commit style

Structure

the Gitmoji Structure of commit styles for monorepo is below

:gitmoji: type(scope): subject
body?
footer?

Example

:sparkles: feat(changelog): support chinese title

:bug: fix(config): fix a subject bug

:memo: docs(repo): 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: fix(SCOPE): some message" # fails
echo ":art: fix(scope): some message" # passes

scope-empty

  • condition: scope is empty
  • rule: never
echo ":art: fix: some message" # fails
echo ":art: fix(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: 72
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

Package Sidebar

Install

npm i commitlint-config-gitmoji-monorepo

Weekly Downloads

13

Version

1.1.3

License

MIT

Unpacked Size

8.41 kB

Total Files

4

Last publish

Collaborators

  • arvinxx