Skip to content

docs: use new commitlint.config.js name in all examples #49

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 1 commit into from
Jul 19, 2017
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions @commitlint/cli/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

## Getting started

```shell
```
npm install --save-dev @commitlint/cli @commitlint/config-angular
echo "module.exports = {extends: ['@commitlint/config-angular']};" > .commitlint.config.js
echo "module.exports = {extends: ['@commitlint/config-angular']};" > commitlint.config.js
```

Consult [docs/cli](http://marionebl.github.io/commitlint/#/reference-cli) for comprehensive documentation.
2 changes: 1 addition & 1 deletion @commitlint/config-angular/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Use with [@commitlint/cli](../cli) and [@commitlint/prompt-cli](../prompt-cli).

```sh
npm install --save-dev @commitlint/config-angular @commitlint/cli
echo "module.exports = {extends: ['@commitlint/config-angular']};" > .commitlint.config.js
echo "module.exports = {extends: ['@commitlint/config-angular']};" > commitlint.config.js
```

## Rules
Expand Down
9 changes: 5 additions & 4 deletions @commitlint/config-lerna-scopes/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ Shareable `commitlint` config enforcing lerna package names as scopes.
Use with [@commitlint/cli](../cli) and [@commitlint/prompt-cli](../prompt-cli).

## Getting started
```sh

```
npm install --save-dev @commitlint/config-lerna-scopes @commitlint/cli
echo "module.exports = {extends: ['@commitlint/config-lerna-scopes']};" > .commitlint.config.js
echo "module.exports = {extends: ['@commitlint/config-lerna-scopes']};" > commitlint.config.js
```

## Examples

```
❯ cat .commitlintrc
❯ cat commitlint.config.js
{
"extends": ["lerna-scopes"]
extends: ['@commitlint/config-lerna-scopes']
}

❯ tree packages
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/config-patternplate/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Use with [@commitlint/cli](../cli) and [@commitlint/prompt-cli](../prompt-cli).
## Getting started
```sh
npm install --save-dev @commitlint/config-patternplate @commitlint/cli
echo "module.exports = {extends: ['@commitlint/config-patternplate']};" > .commitlint.config.js
echo "module.exports = {extends: ['@commitlint/config-patternplate']};" > commitlint.config.js
```

## Rules
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/prompt-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@commitlint/prompt-cli",
"version": "3.0.3",
"description": "commit prompt using .commitlintrc",
"description": "commit prompt using commitlint.config.js",
"bin": {
"commit": "./cli.js"
},
Expand Down
4 changes: 2 additions & 2 deletions @commitlint/prompt-cli/readme.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
> commit prompt using .commitlintrc
> commit prompt using commitlint.config.js

# @commitlint/prompt-cli

## Getting started

```bash
npm install --g @commitlint/prompt-cli @commitlint/config-angular
echo "module.exports = {extends: ['@commitlint/config-angular']};" > .commitlint.config.js
echo "module.exports = {extends: ['@commitlint/config-angular']};" > commitlint.config.js
```

```bash
Expand Down
2 changes: 1 addition & 1 deletion @commitlint/prompt/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@commitlint/prompt",
"version": "3.0.3",
"description": "commitizen prompt using .commitlintrc",
"description": "commitizen prompt using commitlint.config.js",
"main": "./lib/index.js",
"scripts": {
"build": "cross-env NODE_ENV=production babel src --out-dir lib",
Expand Down
4 changes: 2 additions & 2 deletions @commitlint/prompt/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
> commitizen adapter using .commitlintrc
> commitizen adapter using commitlint.config.js

# @commitlint/prompt

Expand All @@ -10,7 +10,7 @@ Learn how to use it at [docs/prompt](http://marionebl.github.io/commitlint/#/gui

```bash
npm install --save @commitlint/prompt @commitlint/config-angular commitizen
echo "module.exports = {extends: ['@commitlint/config-angular']};" > .commitlint.config.js
echo "module.exports = {extends: ['@commitlint/config-angular']};" > commitlint.config.js
```

In package.json
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@


* 🚓 Enforce commit conventions
* 🤖 Plays nice with `conventional-changelog`
* 🤖 Plays nicely with `conventional-changelog`
* 📦 Supports shareable configuration

## Getting started

```
```sh
npm install --save-dev @commitlint/{angular,cli}
echo '{"extends": ["@commitlint/config-angular"]}' > .commitlintrc
echo "module.exports = {extends: ['@commitlint/config-angular']}" > commitlint.config.js
```

## CLI
Expand All @@ -28,7 +28,7 @@ echo '{"extends": ["@commitlint/config-angular"]}' > .commitlintrc

## Config

* Configuration is picked up from `.commitlint` files
* Configuration is picked up from `commitlint.config.js` files
* Packages: [cli](./@commitlint/cli), [core](./@commitlint/core)
* See [Rules](./docs/rules) for a complete list of possible rules
* An example configurations can be found at [@commitlint/config-angular](./@commitlint/config-angular/index.js)
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ npm install -g @commitlint/cli @commitlint/config-angular
## Configure

```bash
echo "module.exports = {extends: [@commitlint/config-angular']}" > .commitlint.config.js
echo "module.exports = {extends: [@commitlint/config-angular']}" > commitlint.config.js
```

## Test
Expand Down
6 changes: 3 additions & 3 deletions docs/concepts-shareable-config.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Concept: Shareable configuration

Most commonly shareable configuration is delivered as npm package exporting
Most commonly shareable configuration is delivered as npm package exporting
an object containing `.rules` as default. To use shared configuration you specify it as item in the `.extends` array:

```js
Expand All @@ -25,7 +25,7 @@ This works recursively, enabling shareable configuration to extend on an indefin
Scoped npm packages are not prefixed.

```js
// .commitlint.config.js
// commitlint.config.js
module.exports = {
extends: ['@commitlint/config-angular'] // => @commitlint/config-angular
};
Expand All @@ -34,7 +34,7 @@ module.exports = {
The same is true for relative imports

```js
// .commitlint
// commitlint.config.js
module.expors = {
extends: ['./example'] // => ./example.js
}
Expand Down
12 changes: 6 additions & 6 deletions docs/guides-ci-setup.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Guide: CI Setup
# Guide: CI Setup

Enforce commit conventions with confidence by linting on your CI servers with `commitlint`.

Expand All @@ -15,7 +15,7 @@ npm init

# Install and configure if needed
npm install --save-dev @commitlint-{cli,angular}
echo "module.exports = {extends: ['@commitlint/config-angular']};"
echo "module.exports = {extends: ['@commitlint/config-angular']};" > commitlint.config.js
```

## First test run with Travis
Expand All @@ -31,7 +31,7 @@ script:
- npm test
```

Make sure Travis is connected to your git repository.
Make sure Travis is connected to your git repository.
Trigger a build by pushing to your repository.

```bash
Expand All @@ -53,7 +53,7 @@ We expect this build to fail:
## Linting relevant commits

What we did so far works but is not very useful as it simply lints the last commit in history.
Let's change that by using environment information provided by TravisCI.
Let's change that by using environment information provided by TravisCI.

Every build exposes the commit that triggered the build via `TRAVIS_COMMIT`.

Expand All @@ -78,11 +78,11 @@ script:
- npm test
```

Nice. This handles direct commits and PR originating from the same repository. Let's add forks to the mix.
Nice. This handles direct commits and PR originating from the same repository. Let's add forks to the mix.

## The full scripts

We'll have to differentiate between forks and same-repo PRs on our own and move the linting to a dedicated script.
We'll have to differentiate between forks and same-repo PRs on our own and move the linting to a dedicated script.

```yaml
# .travis.yml
Expand Down
8 changes: 4 additions & 4 deletions docs/guides-local-setup.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Guide: Local setup

Get high commit message quality and short feedback cycles by linting commit messages right when they are authored.
Get high commit message quality and short feedback cycles by linting commit messages right when they are authored.

This guide demonstrates how to achieve this via git hooks.

## Install commitlint

Install `commitlint` and a `commitlint-config-*` of your choice as devDependency and
Install `commitlint` and a `commitlint-config-*` of your choice as devDependency and
configure `commitlint` to use it.

```bash
Expand All @@ -15,7 +15,7 @@ npm init

# Install and configure if needed
npm install --save-dev @commitlint-{cli,angular}
echo "module.exports = {extends: ['@commitlint/config-angular']};"
echo "module.exports = {extends: ['@commitlint/config-angular']};" > commitlint.config.js
```

## Install husky
Expand All @@ -26,7 +26,7 @@ Install `husky` as devDependency, a handy git hook helper available on npm.
npm install --save-dev husky
```

This allows us to add [git hooks](https://github.com/typicode/husky/blob/master/HOOKS.md#hooks) directly into our `package.json` scripts.
This allows us to add [git hooks](https://github.com/typicode/husky/blob/master/HOOKS.md#hooks) directly into our `package.json` scripts.

```json
{
Expand Down
2 changes: 1 addition & 1 deletion docs/guides-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ npm install --save-dev conventional-changelog-lint@latest
```bash
npm remove --save-dev conventional-changelog-lint
npm install --save commitlint
mv .conventional-changelog-lintrc .commitlintrc
mv .conventional-changelog-lintrc commitlint.config.js
```

* Rename all calls to `conventional-changelog-lint` to `commitlint`
Expand Down
2 changes: 1 addition & 1 deletion docs/guides-use-prompt.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ npm init

# Install and configure if needed
npm install --save-dev @commitlint-{cli,angular,prompt-cli}
echo "module.exports = {extends: ['@commitlint/config-angular']};"
echo "module.exports = {extends: ['@commitlint/config-angular']};" > commitlint.config.js
```

## Provide a shortcut
Expand Down