From 12e195c24e2a3b11c1c679d4227bde3218fef0e5 Mon Sep 17 00:00:00 2001 From: Alexander T Date: Fri, 14 Jun 2019 10:54:11 +0300 Subject: [PATCH] no-throw-literal --- .eslintrc | 2 +- .../importDefinitelyTypedTests/importDefinitelyTypedTests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index 04d9c7ce38d..ca3ca2a7da5 100644 --- a/.eslintrc +++ b/.eslintrc @@ -103,7 +103,7 @@ "no-shadow": "off", "no-sparse-arrays": "error", "no-template-curly-in-string": "off", - "no-throw-literal": "off", + "no-throw-literal": "error", "no-trailing-spaces": "off", "no-undef-init": "error", "no-unsafe-finally": "error", diff --git a/scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.ts b/scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.ts index f14eff609b1..9291714e929 100644 --- a/scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.ts +++ b/scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.ts @@ -18,7 +18,7 @@ function main() { const [, progName, tscRoot, definitelyTypedRoot] = process.argv; if (process.argv.length !== 4) { if (process.argv.length < 2) { - throw "Expected at least 2 argv elements."; + throw new Error("Expected at least 2 argv elements."); } console.log("Usage:"); console.log(` node ${path.relative(__dirname, progName)} [TypeScript Repo Root] [DefinitelyTyped Repo Root]`);