From 1d5f936ceddc2eb738d7279c9745e53ab78e8d4a Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Sun, 2 Jun 2024 17:44:29 +0530 Subject: [PATCH] Move to lower layer for fixing eslint errors --- web/packages/build-config/tsconfig-next.json | 3 --- web/packages/build-config/tsconfig-typecheck.json | 6 +++--- web/packages/new/tsconfig.json | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/web/packages/build-config/tsconfig-next.json b/web/packages/build-config/tsconfig-next.json index 07d38312dc..f06e08e7f4 100644 --- a/web/packages/build-config/tsconfig-next.json +++ b/web/packages/build-config/tsconfig-next.json @@ -2,9 +2,6 @@ /* A base TSConfig for typechecking our Next.js apps and packages. */ "extends": "@/build-config/tsconfig-typecheck.json", "compilerOptions": { - /* Also indicate expectation of a WebWorker runtime */ - "lib": ["ESnext", "DOM", "DOM.Iterable", "WebWorker"], - /* Next.js insists on adding these. Sigh. */ "allowJs": true, "incremental": true diff --git a/web/packages/build-config/tsconfig-typecheck.json b/web/packages/build-config/tsconfig-typecheck.json index 9f3d5fcb4e..22aa4ab67a 100644 --- a/web/packages/build-config/tsconfig-typecheck.json +++ b/web/packages/build-config/tsconfig-typecheck.json @@ -10,8 +10,8 @@ * runtime will have. * * In our case, we tell it that the code will run in a modern browser, - * and will have access to a latest JS (esnext) and the DOM (dom). Our - * transpiler (Next.js) will ensure that these things hold. + * and will have access to a latest JS ("ESNext") and the DOM ("DOM") + * and web workers ("WebWorker"). * * Unlike the other individual library components (say how "esnext" * implies "ESNext.*"), "DOM.Iterable" (the ability to iterate over DOM @@ -21,7 +21,7 @@ * Note that we don't need to specify the `target` compilerOption, since * tsc isn't actually generating (emitting) the JavaScript. */ - "lib": ["ESnext", "DOM", "DOM.Iterable"], + "lib": ["ESnext", "DOM", "DOM.Iterable", "WebWorker"], /* * The module system to assume the generated JavaScript will use. diff --git a/web/packages/new/tsconfig.json b/web/packages/new/tsconfig.json index d890ecabeb..d30f8c21f3 100644 --- a/web/packages/new/tsconfig.json +++ b/web/packages/new/tsconfig.json @@ -1,4 +1,4 @@ { "extends": "@/build-config/tsconfig-typecheck.json", - "include": ["."] + "include": [".", "../next/global-electron.d.ts"] }