From eefe898fb3ac2523f35bbcb5c1d3acf78671a689 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Thu, 28 Feb 2019 12:42:01 +0100 Subject: [PATCH] add error message if bot keep- and out-file-extension is used --- packages/babel-cli/src/babel/options.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/babel-cli/src/babel/options.js b/packages/babel-cli/src/babel/options.js index b2d7aaf50f81..7d554ce6fbcc 100644 --- a/packages/babel-cli/src/babel/options.js +++ b/packages/babel-cli/src/babel/options.js @@ -222,6 +222,12 @@ export default function parseArgv(args: Array): CmdOptions { ); } + if (commander.keepFileExtension && commander.outFileExtension) { + errors.push( + "--out-file-extension cannot be used with --keep-file-extension", + ); + } + if (errors.length) { console.error("babel:"); errors.forEach(function(e) {