Skip to content

Commit d857b2f

Browse files
committed
fix(@angular/build): #31973 - Disable linting warning in onDispose
ESbuild will still treat this as a void and this bypass allows for breaking free of the forced fire-and-forget. Functionally this will have no impact on current behavior, it just adds some extra freedom to potentially process and await the Promise.
1 parent 7457334 commit d857b2f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/angular/build/src/tools/esbuild/angular/compiler-plugin.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -588,13 +588,13 @@ export function createCompilerPlugin(
588588
logCumulativeDurations();
589589
});
590590

591-
build.onDispose(() => Promise.all(
592-
[
593-
compilation?.close?.(),
594-
cacheStore?.close(),
595-
javascriptTransformer?.close()
596-
].filter((p): p is Promise<void> => p !== undefined)
597-
).then(() => sharedTSCompilationState?.dispose())
591+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
592+
build.onDispose(() =>
593+
Promise.all(
594+
[compilation?.close?.(), cacheStore?.close(), javascriptTransformer?.close()].filter(
595+
(p): p is Promise<void> => p !== undefined,
596+
),
597+
).then(() => sharedTSCompilationState?.dispose()),
598598
);
599599

600600
/**

0 commit comments

Comments
 (0)