0.1.3 • Published 1 year ago

@lough/commitlint-config v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@lough/commitlint-config

Commitlint extends configuration.

Install

npm i @lough/commitlint-config -D

or

yarn add @lough/commitlint-config -D

Usage

以下为手动安装步骤,自动安装可使用 Cli

  • 新建 .commitlintrc.js 文件,用于配置 commitlint 检测
module.exports = {
  extends: ['@lough/commitlint-config']
}
  • 安装 git commit hooks
npm install husky@7.0.2 lint-staged@11.1.2 -D
  • package.json 文件,添加 npm prepare hooks
{
  "scripts": {
    "prepare": "husky install"
  },
  "lint-staged": {
    "*.{js,jsx,ts,tsx}": ["eslint -c .eslintrc.js --ext .ts,.tsx"],
    "*.{css,less,scss,styl}": ["stylelint --config .stylelintrc.js *.{css,less,scss,styl}"]
  }
}
  • 初始化 husky
npx husky install
  • .husky/pre-commit 文件,添加 git pre-commit hooks
npx lint-staged
  • .husky/commit-msg 文件,添加 git commit-msg hooks
npx --no-install commitlint --config .commitlintrc.js --edit $1
0.1.3

1 year ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago