Closed gtarsia closed 3 years ago
I think that's too much. I would like make this package more simpler.
You could make a new package to handle this feature.
Something like this:
const meow = require('meow');
const meowExtraneous = require('meow-extraneous');
const cli = meow();
// Do parameter validation
meowExtraneous(cli);
@zzyyxxww I like it. I would call it allowExtraneousFlags
, or maybe allowUnknownFlags
? I agree, it should be false
by default.
PR welcome :)
@sindresorhus if anyone else wants to do this, good, I won't because I thought it would be trivial, but for every flag --no-<flag>
is also a valid flag, and I don't quite know or want to know how to deal with the edge cases for different types
Thanks @weareoutman, @sindresorhus is the pull request of @weareoutman something you would consider merging? Thanks!
Running
git -q
results in:I think that is a good feature because it prevents the user from fat fingering.
Regarding property name, it could be called
allowExtraneous
, justextraneous
or something else.I would go as far as defaulting it to
false
, but I guess that would require a major release, let alone an acceptance of this feature.EDIT: I can provide PR with tests.