UNPKG

3.52 kBMarkdownView Raw
1# conventional-changelog-eslint
2
3[![ESM-only package][package]][package-url]
4[![NPM version][npm]][npm-url]
5[![Node version][node]][node-url]
6[![Dependencies status][deps]][deps-url]
7[![Install size][size]][size-url]
8[![Build status][build]][build-url]
9[![Coverage status][coverage]][coverage-url]
10
11[package]: https://img.shields.io/badge/package-ESM--only-ffe536.svg
12[package-url]: https://nodejs.org/api/esm.html
13
14[npm]: https://img.shields.io/npm/v/conventional-changelog-eslint.svg
15[npm-url]: https://npmjs.com/package/conventional-changelog-eslint
16
17[node]: https://img.shields.io/node/v/conventional-changelog-eslint.svg
18[node-url]: https://nodejs.org
19
20[deps]: https://img.shields.io/librariesio/release/npm/conventional-changelog-eslint
21[deps-url]: https://libraries.io/npm/conventional-changelog-eslint/tree
22
23[size]: https://packagephobia.com/badge?p=conventional-changelog-eslint
24[size-url]: https://packagephobia.com/result?p=conventional-changelog-eslint
25
26[build]: https://img.shields.io/github/actions/workflow/status/conventional-changelog/conventional-changelog/tests.yaml?branch=master
27[build-url]: https://github.com/conventional-changelog/conventional-changelog/actions
28
29[coverage]: https://coveralls.io/repos/github/conventional-changelog/conventional-changelog/badge.svg?branch=master
30[coverage-url]: https://coveralls.io/github/conventional-changelog/conventional-changelog?branch=master
31
32[conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) [eslint](https://github.com/eslint/eslint) preset.
33
34**Issues with the convention itself should be reported on the ESLint issue tracker.**
35
36## Install
37
38```bash
39# yarn
40yarn add -D conventional-changelog-eslint
41# pnpm
42pnpm add -D conventional-changelog-eslint
43# npm
44npm i -D conventional-changelog-eslint
45```
46
47## ESLint Convention
48
49Our commit message format is as follows:
50
51```
52Tag: Short description (fixes #1234)
53
54Longer description here if necessary
55```
56
57The first line of the commit message (the summary) must have a specific format. This format is checked by our build tools.
58
59The `Tag` is one of the following:
60
61* `Fix` - for a bug fix.
62* `Update` - either for a backwards-compatible enhancement or for a rule change that adds reported problems.
63* `New` - implemented a new feature.
64* `Breaking` - for a backwards-incompatible enhancement or feature.
65* `Docs` - changes to documentation only.
66* `Build` - changes to build process only.
67* `Upgrade` - for a dependency upgrade.
68* `Chore` - for refactoring, adding tests, etc. (anything that isn't user-facing).
69
70Use the [labels of the issue you are working on](working-on-issues.md#issue-labels) to determine the best tag.
71
72The message summary should be a one-sentence description of the change, and it must be 72 characters in length or shorter. If the pull request addresses an issue, then the issue number should be mentioned at the end. If the commit doesn't completely fix the issue, then use `(refs #1234)` instead of `(fixes #1234)`.
73
74Here are some good commit message summary examples:
75
76```
77Build: Update Travis to only test Node 0.10 (refs #734)
78Fix: Semi rule incorrectly flagging extra semicolon (fixes #840)
79Upgrade: Esprima to 1.2, switch to using comment attachment (fixes #730)
80```
81
82The commit message format is important because these messages are used to create a changelog for each release. The tag and issue number help to create more consistent and useful changelogs.
83
84Based on https://eslint.org/docs/developer-guide/contributing/pull-requests#step2