Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

make fixes based on code climate suggestions #71

Closed
ashleygwilliams opened this issue Nov 25, 2015 · 2 comments
Closed

make fixes based on code climate suggestions #71

ashleygwilliams opened this issue Nov 25, 2015 · 2 comments

Comments

@ashleygwilliams
Copy link
Contributor

https://codeclimate.com/github/npm/marky-markdown/issues/categories/bugrisk

@zeke
Copy link
Contributor

zeke commented Jan 5, 2016

I'm not sure about the suggestion to use throw instead of process.exit(). Doing so will result in a bunch error output to the screen, when all we really want is usage:

❯ node bin/marky-markdown.js
/Users/z/zeke/marky-markdown/bin/marky-markdown.js:7
  throw new Error('Usage:\n\nmarky-markdown some.md > some.html')
  ^

Error: Usage:

marky-markdown some.md > some.html
  at Object.<anonymous> (/Users/z/zeke/marky-markdown/bin/marky-markdown.js:7:9)
  at Module._compile (module.js:398:26)
  at Object.Module._extensions..js (module.js:405:10)
  at Module.load (module.js:344:32)
  at Function.Module._load (module.js:301:12)
  at Function.Module.runMain (module.js:430:10)
  at startup (node.js:141:18)
  at node.js:980:3

https://twitter.com/zeke/status/684425698321158144

@ashleygwilliams
Copy link
Contributor Author

closing. i don't think these checks are worthwhile.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants