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
Cannot write .conflicts("option-name")
; we should write like .conflicts("optionName")
?
#1796
Comments
And I think giving the leading hyphens ( |
Reasonable question. This is intended design, the conflicting option is identified by the camelCase option name. This is the same pattern used with the other routines passed an option identifier, like This is not mentioned in the README but is included in the example file: https://github.com/tj/commander.js/blob/master/examples/options-conflicts.js ( Supporting the option flags would lead to some additional questions. If you were allowed to use the long flag, would you also be allowed to use the short flag? Would you need to list both to cover both flags?) |
I was actually thinking we might use raw option originally as the key, but when I saw camelCase used in the development of the feature I liked it much better. |
Thanks for the explanation! |
At least But, as you said, there's room for debate how to identify
because it's obvious that the user (developer) is trying to select the UPDATE: I noticed it was not that simple when thinking about |
Is it intended design? I think
.conflicts('option-b'))
is natural.The text was updated successfully, but these errors were encountered: