Skip to content

Latest commit

 

History

History
60 lines (37 loc) · 1.43 KB

COMMITLINT.md

File metadata and controls

60 lines (37 loc) · 1.43 KB

Shared commitlint configuration

The purpose of commitlint is to lint commit messages and make sure they adhere to conventional commit standards.

Acceptable format examples are:

type(scope?): subject
fix(package): fix bug in package
chore(eslint-config): add new rule
chore: fix the monorepo ci job

commitlint is used locally only as a first prevention of errors. The CI will also catch these errors in a job run in Code checks where the wagoid/commitlint-github-action@v4 job is used.

Checking locally improves developer experience as it provides quick feedback on mistakes


Contents

Setup

  • Add workspace reference to @muravjev/configs-commitlint and its peer dependencies:

    pnpm add -w @commitlint/cli -D
  • Add commitlint configuration file:

    // .commitlintrc.js
    
    module.exports = require('@commitlint/config-conventional');

Automation

  • Setup ➡ husky to schedule commitlint execution on commit.

Usage

  • Automatic validation of commit message with commitlint on commit.
    In case of invalid message, commit will be rejected.

License

MIT © Leather Wallet LLC


⬅ Back