@0x219/commitlint-config 中文文档教程

发布于 3年前 浏览 20 项目主页 更新于 3年前

English | 简体中文

@0x219/commitlint-config

code style: prettiernpm (scoped) npm NPM

⚙️ A shareable commitlint config enforcing conventional commits.

Getting started

Install the package in your project directory with:

// with npm
npm install @commitlint/cli @0x219/commitlint-config --save-dev

// with yarn
yarn add @commitlint/cli @0x219/commitlint-config --save-dev

In commitlint.config.js:

module.exports = {
  extends: ['@0x219'],
};

Rules

The most common commit conventions follow this pattern:

<type>[optional scope]: <subject>

[optional body]

[optional footer(s)]

Type

Type cannot be empty, must be lowercase.(build | break | chore | ci | docs | feat | fix | perf | refactor | revert | release | style | test | wip

Subject

The subject cannot be empty and cannot end with. Never allowed "sentence-case", "start-case", "pascal-case", "upper-case".

Body

There must be a space before the body, and the maximum length is 100.

There must be a space before the footer, and the maximum length is 100.

Thanks

commitlint - Lint commit messages.

License

MIT ⓒ Taoist Priest

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文