From e7f64f4510483bf0a94ce46478f02ead8d70e0d2 Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Thu, 30 Nov 2023 09:50:47 -0800 Subject: [PATCH] [js/web] fix ESLint by excluding generated .js from tsconfig.json (#18634) ### Description ESLint will went into error sometimes. The root cause is because some large generated JavaScript file in the tsconfig's include path will cause TypeScript parser fail in a line of `string.match()` with a regex on a huge string (~8MB), causing the following error: ``` RangeError: Maximum call stack size exceeded ``` The solution is to remove the large files from the tsconfig's include path. Previously I excluded the `web/dist/` folder and this PR excludes `web/test/ort.test[.min].js`. --- js/web/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/tsconfig.json b/js/web/tsconfig.json index d60d746e93..80d0cd0642 100644 --- a/js/web/tsconfig.json +++ b/js/web/tsconfig.json @@ -6,5 +6,5 @@ "typeRoots": ["./node_modules/@webgpu/types", "./node_modules/@types", "../node_modules/@types"] }, "include": ["lib", "test"], - "exclude": ["lib/wasm/proxy-worker"] + "exclude": ["lib/wasm/proxy-worker", "test/ort.test.js", "test/ort.test.min.js"] }