diff --git a/docs/README.md b/docs/README.md index fa4cd0a2bf..679aa880ac 100644 --- a/docs/README.md +++ b/docs/README.md @@ -33,8 +33,12 @@ echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitl echo 'foo: bar' | commitlint ⧗ input: foo: bar ✖ type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum] + ✖ found 1 problems, 0 warnings +ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint +``` +```bash # Lint last commit from history commitlint --from=HEAD~1 ``` diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 72294d1cfb..95328b19e7 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -13,4 +13,5 @@ * [Configuration](reference-configuration.md) * [Rules](reference-rules.md) * [API](reference-api.md) + * [Plugins](reference-plugins.md) * [Examples](reference-examples.md) diff --git a/docs/guides-local-setup.md b/docs/guides-local-setup.md index 3d490130c0..dbe0200199 100644 --- a/docs/guides-local-setup.md +++ b/docs/guides-local-setup.md @@ -49,19 +49,25 @@ You can test the hook by simply committing. You should see something like this i ```bash git commit -m "foo: this will fail" -husky > npm run -s commitmsg - +husky > commit-msg (node v10.1.0) +No staged files match any of provided globs. ⧗ input: foo: this will fail ✖ type must be one of [build, chore, ci, docs, feat, fix, perf, refactor, revert, style, test] [type-enum] + ✖ found 1 problems, 0 warnings +ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint husky > commit-msg hook failed (add --no-verify to bypass) +``` -git commit -m "chore: lint on commitmsg" -husky > npm run -s commitmsg +Since [v8.0.0](https://github.com/conventional-changelog/commitlint/releases/tag/v8.0.0) `commitlint` won't output anything if there is not problem with your commit. +(You can use the `--verbose` flag to get positive output) -⧗ input: chore: lint on commitmsg -✔ found 0 problems, 0 warnings +```bash +git commit -m "chore: lint on commitmsg" +husky > pre-commit (node v10.1.0) +No staged files match any of provided globs. +husky > commit-msg (node v10.1.0) ``` ?> Local linting is fine for fast feedback but can easily be tinkered with. To ensure all commits are linted you'll want to check commits on an automated CI Server to. Learn how to in the [CI Setup guide](guides-ci-setup.md). diff --git a/docs/guides-upgrade.md b/docs/guides-upgrade.md index 364512d379..d82b35f503 100644 --- a/docs/guides-upgrade.md +++ b/docs/guides-upgrade.md @@ -161,3 +161,11 @@ echo 'module.exports = {extends: ["@commitlint/config-conventional"]};'; * `config-angular` dropped support for the `chore` type, breaking compat with conventional-changelog, use `config-conventional` instead. + +## Version 7 to 8 + +### Breaking changes + +#### Output on succesful commit will be ommited + +* You can use the `--verbose` flag to get positive output diff --git a/docs/reference-cli.md b/docs/reference-cli.md index 7a6b340902..44261fc6e2 100644 --- a/docs/reference-cli.md +++ b/docs/reference-cli.md @@ -3,7 +3,7 @@ ```bash ❯ npx commitlint --help -@commitlint@6.2.0 - Lint your commit messages +@commitlint/cli@8.0.0 - Lint your commit messages [input] reads from stdin if --edit, --env, --from and --to are omitted --color, -c toggle colored output, defaults to: true @@ -19,5 +19,5 @@ --quiet, -q toggle console output --to, -t upper end of the commit range to lint; applies if edit=false --version, -v display version information ---verbose, -V print summary and inputs for reports without problems +--verbose, -V enable verbose output for reports without problems ```