From e61ae596819107812e2100f5f8662e051d6c67a6 Mon Sep 17 00:00:00 2001 From: David Majda Date: Fri, 7 Oct 2016 20:49:12 +0200 Subject: [PATCH] Code style: Fix ESLint "default-case" errors Part of #407. --- lib/compiler/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/compiler/index.js b/lib/compiler/index.js index 432110b..121816a 100644 --- a/lib/compiler/index.js +++ b/lib/compiler/index.js @@ -66,8 +66,14 @@ let compiler = { }); switch (options.output) { - case "parser": return eval(ast.code); - case "source": return ast.code; + case "parser": + return eval(ast.code); + + case "source": + return ast.code; + + default: + throw new Error("Invalid output format: " + options.output + "."); } } };