# @jzo/commitlint-config-esbing

> 规范团队Git提交记录，方便回溯。

Latest version **0.0.5** (published 2022-02-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install @jzo/commitlint-config-esbing
pnpm add @jzo/commitlint-config-esbing
yarn add @jzo/commitlint-config-esbing
bun add @jzo/commitlint-config-esbing
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2022-02-11 |
| First published | 2022-01-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 11.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 梦里小白龙 |
| Maintainers | jws132 |
| Keywords | commitlint, @jzo/commitlint-config-esbing |

## Links

- npm: https://www.npmjs.com/package/@jzo/commitlint-config-esbing
- npm.io page: https://npm.io/package/@jzo/commitlint-config-esbing

## Dependencies (3)

- [husky](https://npm.io/package/husky.md) ^7.0.4
- [longest](https://npm.io/package/longest.md) ^2.0.1
- [right-pad](https://npm.io/package/right-pad.md) ^1.0.1

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 0.0.5 (latest) — 2022-02-11
- 0.0.3 — 2022-01-25
- 0.0.2 — 2022-01-25
- 0.0.1 — 2022-01-25

## README

## CommitLint 规范

前端 CommitLint 规范

#### 相关依赖

```
npm install husky commitlint @commitlint/config-conventional  --save-dev

```

#### 安装组件

```shell
npm install @jzo/commitlint-config-esbing -D
# OR
yarn add @jzo/commitlint-config-esbing --dev
```

#### 使用

在你的工程根目录下创建一个`commitlint.config.js`配置文件

配置如下即可:

```js
module.exports = {
  extends: '@jzo/commitlint-config-esbing'
}
```

#### 安装 husky

对于 commit-msg hook 我们可以使用以下命令来创建 git hook 所要执行的脚本

依次在项目根目录执行如下两条命令

```
npx husky install
npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"'
npm set-script cz "git add . && git cz && git push"
```

### package.json 修改:

```
  "husky": {
    "hooks": {
      "commit-msg": "commitlint -e HUSKY_GIT_PARAMS"
    }
  },
  "config": {
    "commitizen":{
      "path":"./node_modules/@jzo/commitlint-config-esbing/lib/cz"
    }
  },
```

#### 规范

格式： `<type>[(scope)]: <description>`

示例

```bash
git commit -a -m 'build: xxxxx'
git commit -a -m 'feat(cli): xxxxx'
git commit -a -m 'feat(cli): xxxxx' --no-verify // 不验证规范
```

字段说明

| 字段        | 类型   | 说明                                                         | 必须 |
| ----------- | ------ | ------------------------------------------------------------ | ---- |
| type        | string | 用于表明我们这次提交的改动类型                               | 是   |
| scope       | string | 一个可选的修改范围。用于标识此次提交主要涉及到代码中哪个模块 | 否   |
| description | string | 一句话描述此次提交的主要内容，做到言简意赅                   | 是   |

type

| type 类型 | 说明                                                     |
| --------- | -------------------------------------------------------- |
| feat      | 新增功能                                                 |
| fix       | bug 修复                                                 |
| ui        | 更新 UI                                                  |
| style     | 对代码含义无影响的改动（空格，格式化，等，非 UI 变动）   |
| perf      | 提升性能的代码更改                                       |
| docs      | 只有文档发生改变                                         |
| test      | 添加一些缺失的测试或者修正已存在的测试                   |
| refactor  | 重构代码                                                 |
| chore     | 影响构建系统或外部依赖的更改（例如：gulp，npm，webpack） |
| build     | 编译相关的修改，例如发布版本、对项目构建或者依赖的改动   |
| revert    | 撤销上一次的提交                                         |

---
_Source: https://npm.io/package/@jzo/commitlint-config-esbing · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
