@itaober/commitlint
TypeScript icon, indicating that this package has built-in type declarations

0.1.0-alpha.3 • Public • Published

@itaober/commitlint

English / 简体中文

Introduction

@itaober/commitlint provides a set of predefined Commitlint configurations to help standardize commit messages and supports command-line prompt suggestions.

Install

pnpm install @itaober/commitlint -D

Usage

Commitlint Configuration File

Refer to the Commitlint official configuration documentation.

ESM

/** @type {import("@itaober/commitlint").UserConfig} */
export default {
  extends: ['@itaober/commitlint'],
  // Add your custom configurations here
};

CJS

/** @type {import("@itaober/commitlint").UserConfig} */
module.exports = {
  extends: ['@itaober/commitlint'],
  // Add your custom configurations here
};

commit-msg hook lint

Validate commit messages against commitlint rules before each commit. Follow these steps:

  1. Install the dependencies
pnpm add simple-git-hooks -D
  1. Add the following code to your package.json
{
  "simple-git-hooks": {
    "commit-msg": "npx --no-install commitlint --edit $1"
  }
}

prompt suggestions (optional)

@itaober/commitlint includes @commitlint/cz-commitlint and commitizen, supporting command-line prompt suggestions for commit messages. To enable this feature, follow these steps:

  1. Add the following code to your package.json
{
  "scripts": {
    "cz": "git-cz"
  },
  "config": {
    "commitizen": {
      "path": "@commitlint/cz-commitlint"
    }
  }
}
  1. After git add, run pnpm cz to create a commit message with prompt suggestions.

Changelog

See the CHANGELOG.md.

Readme

Keywords

Package Sidebar

Install

npm i @itaober/commitlint

Weekly Downloads

4

Version

0.1.0-alpha.3

License

MIT

Unpacked Size

11.4 kB

Total Files

7

Last publish

Collaborators

  • itaober