# commitlint-config-ykplus

> Commitlint shareable configuration for YkPlus F2E Guidelines

Latest version **1.0.4** (published 2023-07-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install commitlint-config-ykplus
pnpm add commitlint-config-ykplus
yarn add commitlint-config-ykplus
bun add commitlint-config-ykplus
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2023-07-27 |
| First published | 2023-06-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Rick |
| Maintainers | ykrick |
| Keywords | commitlint, commitlint-config, YkPlus FE Guidelines |

## Links

- npm: https://www.npmjs.com/package/commitlint-config-ykplus
- npm.io page: https://npm.io/package/commitlint-config-ykplus

## Dependencies (1)

- [conventional-changelog-conventionalcommits](https://npm.io/package/conventional-changelog-conventionalcommits.md) ^5.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2023-07-27
- 1.0.3 — 2023-07-25
- 1.0.2 — 2023-07-19
- 1.0.0 — 2023-06-15

## README

# commitlint-config-ykplus

本包提供了《移卡前端规范 - Git 规范》配套的 [commitlint 可共享配置](https://commitlint.js.org/#/concepts-shareable-config)，用于对 git commit message 进行校验。

## 安装

除了本包，你需要同时安装 [@commitlint/cli](https://www.npmjs.com/package/@commitlint/cli)：

```bash
npm install commitlint-config-ykplus @commitlint/cli --save-dev
```

## 使用

在你的 `commitlint.config.js` 中继承本包:

```javascript
module.exports = {
  extends: ['ykplus'],
}
```

### 配合 commitizen 和 husky 使用（推荐）

#### 安装

```bash
npm install commitizen husky --save-dev
```

#### 配置 commitizen

```bash
# npm 5.2+
npx commitizen init cz-conventional-changelog --save-dev --save-exact
```

这时候，你的 `package.json` 会出现下面配置：

```json
...
  "config": {
    "commitizen": {
      "path": "cz-conventional-changelog"
    }
  }
```

#### 设置 husky hooks

1. 添加 `prepare-commit-msg` hook

```sh
npx husky add .husky/prepare-commit-msg "exec < /dev/tty && npx cz --hook || true"
```

2. 添加 `commit-msg` hook

```sh
npx husky add .husky/commit-msg 'npx --no -- commitlint --edit "$1"'
```

## 更多信息可参考:

- [commitlint 文档](https://commitlint.js.org/#/)
- [commitizen 文档](https://github.com/commitizen/cz-cli)
- [husky 文档](https://typicode.github.io/husky/#/)

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