From fbb18d40d3cfd0d24262e8e73b97f22770734572 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Fri, 11 Sep 2020 16:22:10 +0200 Subject: [PATCH] feat(unstable): enable importsNotUsedAsValues by default (#7413) --- cli/tsc.rs | 2 ++ std/tsconfig_test.json | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cli/tsc.rs b/cli/tsc.rs index e3c7d9d8408776..d78485fd3b83fd 100644 --- a/cli/tsc.rs +++ b/cli/tsc.rs @@ -612,6 +612,7 @@ impl TsCompiler { "inlineSourceMap": true, // TODO(lucacasonato): enable this by default in 1.5.0 "isolatedModules": unstable, + "importsNotUsedAsValues": if unstable { "error" } else { "remove" }, "jsx": "react", "lib": lib, "module": "esnext", @@ -1248,6 +1249,7 @@ pub async fn runtime_compile( "esModuleInterop": true, // TODO(lucacasonato): enable this by default in 1.5.0 "isolatedModules": unstable, + "importsNotUsedAsValues": if unstable { "error" } else { "remove" }, "jsx": "react", "module": "esnext", "sourceMap": true, diff --git a/std/tsconfig_test.json b/std/tsconfig_test.json index 8dee5fa2a4a133..2d2123fac9609c 100644 --- a/std/tsconfig_test.json +++ b/std/tsconfig_test.json @@ -1,5 +1,6 @@ { "compilerOptions": { - "isolatedModules": true + "isolatedModules": true, + "importsNotUsedAsValues": "error" } }