Skip to content

docs: point first-time users to docs #492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion @commitlint/format/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function formatResult(result = {}, options = {}) {
const decoration = enabled ? chalk[color](sign) : sign;
const summary = `${decoration} found ${errors.length} problems, ${
warnings.length
} warnings`;
} warnings \n (Need help? -> https://github.com/marionebl/commitlint#what-is-commitlint)`;
return [...problems, enabled ? chalk.bold(summary) : summary];
}

Expand Down
6 changes: 5 additions & 1 deletion @commitlint/format/src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import chalk from 'chalk';
import includes from 'lodash.includes';
import format from '.';

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

test('does nothing without arguments', t => {
const actual = format();
Expand Down
39 changes: 39 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

## Contents

* [What is commitlint](#what-is-commitlint)
* [Benefits using commitlint](#benefits-using-commitlint)
* [Getting started](#getting-started)
* [CLI](#cli)
* [Config](#config)
Expand All @@ -35,6 +37,43 @@

* * *

## What is commitlint
Commitlint is a linter which is linting your commit-messages according to the [conventional commit format](https://conventionalcommits.org).

In general the pattern mostly looks like this:
```sh
type(scope?): subject #scope is optional
```
Real world examples can look like this:
```
chore: run tests on travis ci
```
```
fix(server): send cors headers
```
```
feat(blog): add comment section
```
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:
- build
- ci
- chore
- docs
- feat
- fix
- perf
- refactor
- revert
- style
- test

These can be modified by your own configuration.

### Benefits using commitlint
- [Why Use Conventional Commits?](https://www.conventionalcommits.org/en/v1.0.0-beta.2/#why-use-conventional-commits)
- ["The perks of committing with conventions" (Talk slides)](https://slides.com/marionebl/the-perks-of-committing-with-conventions#/)


## Getting started

```sh
Expand Down