From 2b8c1218b7b905c0eb243ab767dc7e4ceda345ac Mon Sep 17 00:00:00 2001 From: Mofei Zhang Date: Tue, 22 Oct 2024 17:06:11 -0700 Subject: [PATCH] [compiler][ez] tsconfig: treat all snap fixtures as modules Qol improvement. Currently, typescript lints treat test fixtures without an export as a 'global script' (see [docs](https://www.typescriptlang.org/docs/handbook/2/modules.html#how-javascript-modules-are-defined)). This gives confusing lints for duplicate declarations (in the global scope) --- .../src/__tests__/fixtures/tsconfig.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/tsconfig.json b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/tsconfig.json index 07d6d2baae402..7c51d213ede6e 100644 --- a/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/tsconfig.json +++ b/compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/tsconfig.json @@ -19,7 +19,9 @@ }, "verbatimModuleSyntax": true, "module": "ESNext", - "allowSyntheticDefaultImports": true + "allowSyntheticDefaultImports": true, + "moduleDetection": "force" + }, "include": [ "./compiler/**/*.js",