Skip to content

Commit 019d596

Browse files
committed
docs: add full documentation for this project with my new readme style
1 parent 2ae87a0 commit 019d596

File tree

2 files changed

+110
-13
lines changed

2 files changed

+110
-13
lines changed

README.md

Lines changed: 61 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,70 @@
11
# commitlint configuration
22

3-
commitlint configuration.
3+
[commitlint](https://commitlint.js.org/) configuration extending [@commitlint/config-conventional][@commitlint/config-conventional].
4+
5+
- Based on [@commitlint/config-conventional][@commitlint/config-conventional].
6+
- Allow longer commit messages headers specifically for dependency management tools like [WhiteSource Renovate](https://www.whitesourcesoftware.com/free-developer-tools/renovate).
7+
- No restriction on maximum line length of body and footer.
8+
9+
---
10+
11+
[![npm version](https://img.shields.io/npm/v/@vidavidorra/commitlint-config?logo=npm&style=flat-square)](https://www.npmjs.com/package/@vidavidorra/commitlint-config)
12+
[![npm downloads](https://img.shields.io/npm/dm/@vidavidorra/commitlint-config?logo=npm&style=flat-square)](https://www.npmjs.com/package/@vidavidorra/commitlint-config)
13+
[![Renovate enabled](https://img.shields.io/badge/Renovate-enabled-brightgreen.svg?logo=renovatebot&logoColor&style=flat-square)](https://renovatebot.com)
14+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)
15+
[![Code coverage](https://img.shields.io/codecov/c/github/vidavidorra/commitlint-config?logo=codecov&style=flat-square)](https://codecov.io/gh/vidavidorra/commitlint-config)
16+
[![License](https://img.shields.io/github/license/vidavidorra/commitlint-config.svg?style=flat-square)](LICENSE.md)
417

518
<a name="toc"></a>
619

720
## Table of contents
821

9-
- [Badges](#badges)
22+
- [Install](#install)
23+
- [Usage](#usage)
24+
- [Documentation](#documentation)
25+
- [Contributing](#contributing)
26+
- [Security policy](#security-policy)
1027
- [License](#license)
1128

12-
## Badges
29+
## Install
30+
31+
```shell
32+
npm install --save-dev @vidavidorra/commitlint-config @commitlint/cli
33+
```
34+
35+
## Usage
36+
37+
Use this configuration in your project's commitlint configuration by specifying it as item in the `extends` array ([commitlint Shareable configuration](https://commitlint.js.org/#/concepts-shareable-config?id=concept-shareable-configuration)).
38+
39+
> **_Note_**: You may use either just the scope, `@vidavidorra`, or the full path `@vidavidorra/commitlint-config` of the package.
40+
41+
```js
42+
module.exports = {
43+
extends: ['@vidavidorra'],
44+
};
45+
```
46+
47+
## Documentation
1348

14-
| Badge | Description | Service |
15-
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | -------------------- |
16-
| <a href="https://github.com/prettier/prettier#readme"><img alt="code style" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"></a> | Code style | Prettier |
17-
| <a href="https://conventionalcommits.org"><img alt="Conventional Commits: 1.0.0" src="https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square"></a> | Commit style | Conventional Commits |
18-
| <a href="https://github.com/semantic-release/semantic-release"><img alt="semantic-release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square"></a> | Version management | semantic-release |
19-
| <a href="https://renovatebot.com"><img alt="Renovate enabled" src="https://img.shields.io/badge/renovate-enabled-brightgreen.svg?style=flat-square"></a> | Dependencies | Renovate |
20-
| <a href="https://github.com/vidavidorra/commitlint-config/actions"><img alt="GitHub workflow status" src="https://img.shields.io/github/workflow/status/vidavidorra/commitlint-config/Lint%20commit%20messages?style=flat-square"></a> | Lint commit messages | GitHub Actions |
21-
| <a href="https://github.com/vidavidorra/commitlint-config/actions"><img alt="GitHub workflow status" src="https://img.shields.io/github/workflow/status/vidavidorra/commitlint-config/Build?style=flat-square"></a> | Build | GitHub Actions |
22-
| <a href="https://codecov.io/gh/vidavidorra/commitlint-config"><img alt="Code coverage" src="https://img.shields.io/codecov/c/github/vidavidorra/commitlint-config?style=flat-square"></a> | Code coverage | Codecov |
23-
| <a href="https://www.npmjs.com/package/@vidavidorra/commitlint-config"><img alt="npm version" src="https://img.shields.io/npm/v/@vidavidorra/commitlint-config?style=flat-square"></a> | npm version | npm |
49+
See [docs/rules](docs/rules.md) for the configured rules.
50+
51+
## Contributing
52+
53+
Please [create an issue](https://github.com/vidavidorra/commitlint-config/issues/new/choose) if you have a bug report, feature proposal or question that does not yet exist.
54+
55+
Please give this project a star ⭐ if you like it and consider becoming a [sponsor](https://github.com/sponsors/jdbruijn) to support this project.
56+
57+
Please refer to the [contributing guide](https://github.com/vidavidorra/CONTRIBUTING.md) detailed information about other contributions, like pull requests.
58+
59+
[![Conventional Commits: 1.0.0](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)
60+
[![Code style](https://img.shields.io/badge/code_style-Prettier-ff69b4.svg?logo=prettier&style=flat-square)](https://github.com/prettier/prettier)
61+
[![Linting](https://img.shields.io/badge/linting-ESLint-lightgrey.svg?logo=eslint&style=flat-square)](https://eslint.org)
62+
[![Lint commit messages](https://img.shields.io/github/workflow/status/vidavidorra/commitlint-config/Lint%20commit%20messages?logo=github&label=Lint%20commit%20messages&style=flat-square)](https://github.com/vidavidorra/commitlint-config/actions)
63+
[![Build](https://img.shields.io/github/workflow/status/vidavidorra/commitlint-config/Build?logo=github&label=Build&style=flat-square)](https://github.com/vidavidorra/commitlint-config/actions)
64+
65+
## Security policy
66+
67+
Please refer to the [Security Policy on GitHub](https://github.com/vidavidorra/commitlint-config/security/) for the security policy.
2468

2569
## License
2670

@@ -47,3 +91,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
4791
The full text of the license is available in the [LICENSE](LICENSE.md) file in this repository and [online](https://www.gnu.org/licenses/gpl.html).
4892

4993
</details>
94+
95+
<!-- References -->
96+
97+
[@commitlint/config-conventional]: https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional

docs/rules.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Rules
2+
3+
This configuration is extending [@commitlint/config-conventional][@commitlint/config-conventional]. Only the changed and added rules, compared to [@commitlint/config-conventional][@commitlint/config-conventional], are documentend here.
4+
5+
## body-max-line-length
6+
7+
- **condition:** `body` each line has `value` or less characters.
8+
- **level:** `disabled`.
9+
10+
## footer-max-line-length
11+
12+
- **condition:** `footer` lines has `value` or less characters.
13+
- **level:** `disabled`.
14+
15+
## header-max-length
16+
17+
- **condition:** `header` has `value` or less characters.
18+
- **level:** `disabled`.
19+
20+
## function-rules/header-max-length
21+
22+
- **condition:** `header` has `value` or less characters.
23+
- **level:** `error`.
24+
- **rule:** `always`.
25+
- **value**
26+
The value is dependent on the commit header and can have the following values.
27+
- Default.
28+
```
29+
100
30+
```
31+
- If `header.type` equals `chore` or `fix` and `header.scope` equals `deps` or `peer-deps`.
32+
```
33+
200
34+
```
35+
36+
```shell
37+
$ echo 'chore: Knowledge, like air, is vital to life. Like air, no one should be denied it. - Alan Moore' # passes
38+
$ echo 'chore: Knowledge, like air, is vital to life. Like air, no one should be denied it. - Alan Moore, V for Vendetta' # fails
39+
40+
$ echo 'chore(deps): We are told to remember the idea, not the man, because a man can fail. He can be caught, he can be killed and forgotten, but 400 years later, an idea can still change the world.' # passes
41+
$ echo 'chore(deps): We are told to remember the idea, not the man, because a man can fail. He can be caught, he can be killed and forgotten, but 400 years later, an idea can still change the world. - Alan Moore' # fails
42+
43+
$ echo 'chore(peer-deps): We are told to remember the idea, not the man, because a man can fail. He can be caught, he can be killed and forgotten, but 400 years later, an idea can still change the world.' # passes
44+
$ echo 'chore(peer-deps): We are told to remember the idea, not the man, because a man can fail. He can be caught, he can be killed and forgotten, but 400 years later, an idea can still change the world. - Alan Moore' # fails
45+
```
46+
47+
<!-- References -->
48+
49+
[@commitlint/config-conventional]: https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional

0 commit comments

Comments
 (0)