Closed tommy-mitchell closed 1 year ago
Should flag.aliases
be a part of this PR as well, or a separate one?
Should flag.aliases be a part of this PR as well, or a separate one?
Separate
Can you make it throw a user-friendly error when alias
option is used?
Can you make it throw a user-friendly error when
alias
option is used?
meow({
importMeta,
flags: {
foo: {
type: 'string',
alias: 'f',
},
bar: {
type: 'string',
alias: 'b',
},
baz: {
type: 'string',
shortFlag: 'z',
},
},
});
//=> 'The option `alias` has been renamed to `shortFlag`. The following flags need to be updated: `foo`, `bar`'
Perfect 👍
Closes #109.
flag.alias
is nowflag.shortFlag
for users:An extra check was added to
buildParserFlags()
to ensure compatibility withminimist-options
: