Skip to content

Commit 2af4f39

Browse files
Disallow asynchronous import statements (#2017)
1 parent 03a131f commit 2af4f39

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.eslintrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
{
2121
"selector": "CallExpression[callee.object.object.callee.name='tag'][callee.property.name='only']",
2222
"message": "Unexpected exclusive mocha test with tag().suite.only() or tag().test.only()"
23+
},
24+
{
25+
"selector": "ImportExpression",
26+
"message": "Dynamic imports using 'import()' are not allowed. Use static imports at the top of the file instead."
2327
}
2428
],
2529
"@typescript-eslint/no-floating-promises": ["warn", { "checkThenables": true }],

test/unit-tests/toolchain/BuildFlags.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,6 @@ suite("BuildFlags Test Suite", () => {
571571

572572
// Mock execSwift to throw an error
573573
execSwiftSpy = sinon.spy(() => Promise.reject(new Error("Command failed")));
574-
const utilities = await import("@src/utilities/utilities");
575574
sinon.replace(utilities, "execSwift", execSwiftSpy);
576575

577576
const log = instance(logger);

0 commit comments

Comments
 (0)