@dasa-health/commitlint-config

1.1.0 • Public • Published

Getting started

A shareable commitlint config enforcing the dasa commit conventions:

Install

yarn add -D @commitlint/cli @commitlint/config-conventional @dasa-health/commitlint-config

Usage

# Install commitlint cli and conventional config
npm install --save-dev @commitlint/{config-conventional,cli}
# or yarn
yarn add -D @commitlint/config-conventional  @commitlint/cli
# For Windows:
npm install --save-dev @commitlint/config-conventional @commitlint/cli

# Configure commitlint to use conventional config
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js

To lint commits before they are created you can use Husky's 'commit-msg' hook.

Install in your project npm install husky --save-dev or yarn add -D husky.

After that, you can create a .huskyrc file or add to your package.json the following code:

{
  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
  }
}

How publish

At project root:

Set your npm token

yarn workspace @dasa-health/commitlint-config publish --access=public --non-interactive

Usage at commits

We use the conventional commit lint configuration as base to our configuration, all rules are documented at our index.js

All commits must flow the following pattern:

<type>(<scope>): <short summary>
  │       │             │
  │       │             └─⫸ Summary in present tense. Capitalized or not. No period at the end.
  │       │
  │       └─⫸ Commit Scope: Isure number
  │
  └─⫸ Commit Type: See our types bellow

Also you can add your issue number at commit

type(ISSUE-01): subject or Subject

Our types are:

['build', 'ci', 'chore', 'docs', 'feat', 'fix', 'merge', 'perf', 'refactor', 'revert', 'style', 'test', 'hotfix', 'fastlane']

Readme

Keywords

none

Package Sidebar

Install

npm i @dasa-health/commitlint-config

Weekly Downloads

30

Version

1.1.0

License

MIT

Unpacked Size

3.38 kB

Total Files

4

Last publish

Collaborators

  • felipe.silva.devtech
  • nav.mobile
  • lucasrusso95
  • allan.pinheiro
  • marcoaure