Skip to content

Commit ca74d90

Browse files
escapedcatmarionebl
authored andcommitted
docs: point first-time users to docs
1 parent 3b3667a commit ca74d90

File tree

3 files changed

+45
-2
lines changed

3 files changed

+45
-2
lines changed

Diff for: @commitlint/format/src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function formatResult(result = {}, options = {}) {
6262
const decoration = enabled ? chalk[color](sign) : sign;
6363
const summary = `${decoration} found ${errors.length} problems, ${
6464
warnings.length
65-
} warnings`;
65+
} warnings \n (Need help? -> https://github.com/marionebl/commitlint#what-is-commitlint)`;
6666
return [...problems, enabled ? chalk.bold(summary) : summary];
6767
}
6868

Diff for: @commitlint/format/src/index.test.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import chalk from 'chalk';
33
import includes from 'lodash.includes';
44
import format from '.';
55

6-
const ok = chalk.bold(`${chalk.green('✔')} found 0 problems, 0 warnings`);
6+
const ok = chalk.bold(
7+
`${chalk.green(
8+
'✔'
9+
)} found 0 problems, 0 warnings \n (Need help? -> https://github.com/marionebl/commitlint#what-is-commitlint)`
10+
);
711

812
test('does nothing without arguments', t => {
913
const actual = format();

Diff for: README.md

+39
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
## Contents
2121

22+
* [What is commitlint](#what-is-commitlint)
23+
* [Benefits using commitlint](#benefits-using-commitlint)
2224
* [Getting started](#getting-started)
2325
* [CLI](#cli)
2426
* [Config](#config)
@@ -35,6 +37,43 @@
3537

3638
* * *
3739

40+
## What is commitlint
41+
commitlint checks if your commit messages meet the [conventional commit format](https://conventionalcommits.org).
42+
43+
In general the pattern mostly looks like this:
44+
```sh
45+
type(scope?): subject #scope is optional
46+
```
47+
Real world examples can look like this:
48+
```
49+
chore: run tests on travis ci
50+
```
51+
```
52+
fix(server): send cors headers
53+
```
54+
```
55+
feat(blog): add comment section
56+
```
57+
Common types according to [commitlint-config-conventional (based on the the Angular convention)](https://github.com/marionebl/commitlint/tree/master/%40commitlint/config-conventional#type-enum) can be:
58+
- build
59+
- ci
60+
- chore
61+
- docs
62+
- feat
63+
- fix
64+
- perf
65+
- refactor
66+
- revert
67+
- style
68+
- test
69+
70+
These can be modified by [your own configuration](#config).
71+
72+
### Benefits using commitlint
73+
- [Why Use Conventional Commits?](https://www.conventionalcommits.org/en/v1.0.0-beta.2/#why-use-conventional-commits)
74+
- ["The perks of committing with conventions" (Talk slides)](https://slides.com/marionebl/the-perks-of-committing-with-conventions#/)
75+
76+
3877
## Getting started
3978

4079
```sh

0 commit comments

Comments
 (0)