Skip to content

Latest commit

 

History

History
50 lines (34 loc) · 1.17 KB

File metadata and controls

50 lines (34 loc) · 1.17 KB

@tomjs/commitlint

npm node-current (scoped) NPM

English | 中文

Front-end project commitlint Code submission specification configuration, node>=18 is recommended.

Usage

  • Install dependencies
pnpm add -D @commitlint/cli @tomjs/commitlint
  • Modify commitlint.config.{js,mjs,ts,mts} configuration
export default {
  extends: ['@tomjs/commitlint'],
};
  • Combine with other libraries

Used in conjunction with simple-git-hooks and lint-staged.

pnpm add -D simple-git-hooks lint-staged

scripts of package.json added prepare

{
  "scripts": {
    "prepare": "simple-git-hooks"
  }
}

Make configuration

pnpm add --save-peer @commitlint/cli
pnpm add @commitlint/config-conventional