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:
Huáng Jùnliàng
2019-11-12 18:25:24 -05:00
committed by Nicolò Ribaudo
parent ce070ce422
commit 7633f09479
8 changed files with 17 additions and 1 deletions

View File

@@ -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,