Babel should not silently remove unknown options after command… (#10698)
* chore: add test case * chore: bump commander to 4.0.1 * fix: let commander.js throw on unknown options after args
This commit is contained in:
committed by
Nicolò Ribaudo
parent
ce070ce422
commit
7633f09479
@@ -163,6 +163,10 @@ commander.option(
|
||||
|
||||
commander.version(pkg.version + " (@babel/core " + version + ")");
|
||||
commander.usage("[options] <files ...>");
|
||||
// register an empty action handler so that commander.js can throw on
|
||||
// unknown options _after_ args
|
||||
// see https://github.com/tj/commander.js/issues/561#issuecomment-522209408
|
||||
commander.action(() => {});
|
||||
|
||||
export type CmdOptions = {
|
||||
babelOptions: Object,
|
||||
|
||||
Reference in New Issue
Block a user