Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 1012 Bytes

README.md

File metadata and controls

60 lines (43 loc) · 1012 Bytes

@bit-ocean/commitlint-config

npm

Universal Commitlint configuration.

Installation

pnpm add -D @commitlint/cli @commitlint/config-conventional cz-git commitizen @bit-ocean/commitlint-config

Configuration

Create a .commitlintrc.json file in the root of your project and add the following:

{
  "extends": ["@bit-ocean"]
}

Then add the following properties to your package.json:

{
  "scripts": {
    "cz": "git-cz"
  },
  "config": {
    "commitizen": {
      "path": "node_modules/cz-git"
    }
  }
}

Husky Configuration

Run following command to add husky and a commit-msg hook:

pnpm add -D husky
pnpm i
npx husky init
echo 'npx --no -- commitlint --edit "$1"' > .husky/commit-msg

Usage

Run the following command to commit your changes:

git add .
pnpm cz

License

MIT License © 2024 Bit Ocean