From 45860790c553ffdc09fdf9b349a7fc8fc71343c5 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 12 Sep 2025 17:15:50 +0000
Subject: [PATCH] Enable noUncheckedSideEffectImports by default and fix
affected tests
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
---
src/compiler/commandLineParser.ts | 2 +-
tests/cases/fourslash/findAllRefsUnresolvedSymbols2.ts | 2 ++
tests/cases/fourslash/findAllRefsUnresolvedSymbols3.ts | 2 ++
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts
index 09f810f2046..1ef420daf85 100644
--- a/src/compiler/commandLineParser.ts
+++ b/src/compiler/commandLineParser.ts
@@ -1243,7 +1243,7 @@ const commandOptionsWithoutBuild: CommandLineOption[] = [
affectsBuildInfo: true,
category: Diagnostics.Modules,
description: Diagnostics.Check_side_effect_imports,
- defaultValueDescription: false,
+ defaultValueDescription: true,
},
// Source Maps
diff --git a/tests/cases/fourslash/findAllRefsUnresolvedSymbols2.ts b/tests/cases/fourslash/findAllRefsUnresolvedSymbols2.ts
index e60abcd1237..93244bf1dd8 100644
--- a/tests/cases/fourslash/findAllRefsUnresolvedSymbols2.ts
+++ b/tests/cases/fourslash/findAllRefsUnresolvedSymbols2.ts
@@ -1,5 +1,7 @@
///
+// @noUncheckedSideEffectImports: false
+
////import { /*a0*/Bar } from "does-not-exist";
////
////let a: /*a1*/Bar;
diff --git a/tests/cases/fourslash/findAllRefsUnresolvedSymbols3.ts b/tests/cases/fourslash/findAllRefsUnresolvedSymbols3.ts
index 1088fb94562..e469a9278a7 100644
--- a/tests/cases/fourslash/findAllRefsUnresolvedSymbols3.ts
+++ b/tests/cases/fourslash/findAllRefsUnresolvedSymbols3.ts
@@ -1,5 +1,7 @@
///
+// @noUncheckedSideEffectImports: false
+
////import * as /*a0*/Bar from "does-not-exist";
////
////let a: /*a1*/Bar;