Skip to content
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

fix: nicer error messages #93

Merged
merged 6 commits into from
Oct 14, 2017
Merged

fix: nicer error messages #93

merged 6 commits into from
Oct 14, 2017

Conversation

marionebl
Copy link
Contributor

Before

❯ npx commitlint
npx: installed 127 in 7.134s
~/commitlint/node_modules/@commitlint/cli/cli.js:144
                throw err;
                ^

TypeError: Expected a raw commit
    at parser (~/commitlint/node_modules/conventional-commits-parser/lib/parser.js:17:11)
    at sync (~/commitlint/node_modules/conventional-commits-parser/index.js:96:10)
    at $If_1 (~/commitlint/node_modules/@commitlint/core/lib/library/parse.js:37:13)
    at ~/commitlint/node_modules/@commitlint/core/lib/library/parse.js:29:19
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

After

❯ npx commitlint

  @commitlint/cli@4.2.0 - Lint your commit messages

  [input] reads from stdin if --edit, --from and --to are omitted
  --color, -c            toggle colored output, defaults to: true
  --cwd, -d              directory to execute in, defaults to: /Users/marneb/Documents/oss/commitlint
  --edit, -e             read last commit message from the specified file or fallbacks to ./.git/COMMIT_EDITMSG
  --extends, -x          array of shareable configurations to extend
  --from, -f             lower end of the commit range to lint; applies if edit=false
  --to, -t               upper end of the commit range to lint; applies if edit=false
  --quiet, -q            toggle console output
  --parser-preset, -p    configuration preset to use for conventional-commits-parser

[input] is required: supply via stdin, or --edit or --from and --to

@marionebl marionebl merged commit dcfad61 into master Oct 14, 2017
@marionebl marionebl deleted the fix/cli/nicer-error-mesage branch October 14, 2017 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant