summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Casonato <lucacasonato@yahoo.com>2020-09-11 16:22:10 +0200
committerGitHub <noreply@github.com>2020-09-11 16:22:10 +0200
commitfbb18d40d3cfd0d24262e8e73b97f22770734572 (patch)
treec0ae7066851bc13c791c8efef1c7a2079c9f7212
parent0d1f626edd7c574ff0e70438cdb678dcb5c91170 (diff)
feat(unstable): enable importsNotUsedAsValues by default (#7413)
-rw-r--r--cli/tsc.rs2
-rw-r--r--std/tsconfig_test.json3
2 files changed, 4 insertions, 1 deletions
diff --git a/cli/tsc.rs b/cli/tsc.rs
index e3c7d9d84..d78485fd3 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 8dee5fa2a..2d2123fac 100644
--- a/std/tsconfig_test.json
+++ b/std/tsconfig_test.json
@@ -1,5 +1,6 @@
{
"compilerOptions": {
- "isolatedModules": true
+ "isolatedModules": true,
+ "importsNotUsedAsValues": "error"
}
}