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]`);