dthree / vorpal

Node's framework for interactive CLIs
http://vorpal.js.org
MIT License
5.63k stars 278 forks source link

[2.0 Proposition] Rename vorpal.catch to avoid Promise ambiguity #325

Open AdrieanKhisbe opened 5 years ago

AdrieanKhisbe commented 5 years ago

I think we should take benefit of the inbuilding v2 to rename the .catch() commands. One of the reason is that is connote a promise method, error handling of other command. Besides it's usage is wrongly flagged as error by the common used promised eslint config with rule promise/catch-or-return

I'm not sure on which name we should use, but something around miss like onCommandMiss, or onNonMatchingCommand, or maybe better and simplerfallback