1.5.0 • Published 3 years ago

@logicalhq/commitlint-config v1.5.0

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

Table of Contents

Convention

  • A commit type is always lowercased and must be provided at all-time.
  • We use Gitmojis as commit types.
  • The scope is optional but must be lowercased if used.
  • Like a sentence: a commit subject must be capitalized and ends with a period.
  • The message body and footer should start with a leading blank line.
  • A line can't exceed 100 characters.

Getting Started

Install the development dependency:

yarn add -D @logicalhq/commitlint-config

And simply add a .commitlintrc.js file at the project root:

module.exports = {
  extends: ['@logicalhq/commitlint-config']
};

Examples

git commit -m ":tada: Initial commit." # passes
git commit -m ":sparkles:(ci) Set-up GitHub actions." # passes
git commit -m ":bento: Fix assets (logo). [#123]" # passes
git commit -m "Initial commit." # fails: no commit type.
git commit -m ":tada: Initial commit" # fails: no full-stop.
git commit -m ":unkown: Initial commit." # fails: that gitmoji doesn't exists.

Extending the rules

This convention can be extended to fit a project needs (i.e: specifying scopes):

// .commitlintrc.js
module.exports = {
  extends: ['@logicalhq/commitlint-config'],
  rules: {
    'scope-enum': [
      2,
      'always',
      [
        'ci',
        'security',
        'auth',
        'billing'
        // ...
      ]
    ]
  }
};

License

This project and Carlos Cuesta's Gitmojis are licensed under MIT.

1.5.0

3 years ago

1.4.0

3 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago