From 065d543ab54f8b3b00708e44056f498c192b5220 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Fri, 19 Dec 2025 14:47:15 -0500 Subject: [PATCH 1/2] disallow asynchronous import statements --- .eslintrc.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.eslintrc.json b/.eslintrc.json index b88534848..7a95b537a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -20,6 +20,10 @@ { "selector": "CallExpression[callee.object.object.callee.name='tag'][callee.property.name='only']", "message": "Unexpected exclusive mocha test with tag().suite.only() or tag().test.only()" + }, + { + "selector": "ImportExpression", + "message": "Dynamic imports using 'import()' are not allowed. Use static imports at the top of the file instead." } ], "@typescript-eslint/no-floating-promises": ["warn", { "checkThenables": true }], From a21b604fed2fa377b683cc1b109ff47400a03149 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Fri, 19 Dec 2025 15:02:26 -0500 Subject: [PATCH 2/2] remove an existing async import --- test/unit-tests/toolchain/BuildFlags.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/test/unit-tests/toolchain/BuildFlags.test.ts b/test/unit-tests/toolchain/BuildFlags.test.ts index 10b833e6b..d8c2d29c6 100644 --- a/test/unit-tests/toolchain/BuildFlags.test.ts +++ b/test/unit-tests/toolchain/BuildFlags.test.ts @@ -571,7 +571,6 @@ suite("BuildFlags Test Suite", () => { // Mock execSwift to throw an error execSwiftSpy = sinon.spy(() => Promise.reject(new Error("Command failed"))); - const utilities = await import("@src/utilities/utilities"); sinon.replace(utilities, "execSwift", execSwiftSpy); const log = instance(logger);