From 238dc414c6323414be975b51823ab70f79231c2b Mon Sep 17 00:00:00 2001 From: Jacob Ebey Date: Wed, 3 Aug 2022 11:25:53 -0700 Subject: [PATCH] chore: update tsconfigs to exclude node_modules and skip lib checks This speeds up the build by telling TSC exactly what to check and what to skip reducing discovery time. It also is needed for our upgrade to react 18 otherwise types start loosing their s. --- packages/create-remix/tsconfig.json | 3 ++- packages/remix-architect/tsconfig.json | 4 +++- packages/remix-cloudflare-pages/tsconfig.json | 2 +- packages/remix-cloudflare-workers/tsconfig.json | 2 +- packages/remix-cloudflare/tsconfig.json | 2 +- packages/remix-dev/tsconfig.json | 2 +- packages/remix-express/tsconfig.json | 3 ++- packages/remix-netlify/tsconfig.json | 3 ++- packages/remix-node/tsconfig.json | 3 ++- packages/remix-react/tsconfig.json | 4 +++- packages/remix-serve/tsconfig.json | 4 +++- packages/remix-server-runtime/tsconfig.json | 3 ++- packages/remix-vercel/tsconfig.json | 4 +++- packages/remix/tsconfig.json | 4 +++- 14 files changed, 29 insertions(+), 14 deletions(-) diff --git a/packages/create-remix/tsconfig.json b/packages/create-remix/tsconfig.json index 8902e1cd5a1..78d4c038821 100644 --- a/packages/create-remix/tsconfig.json +++ b/packages/create-remix/tsconfig.json @@ -1,5 +1,6 @@ { - "exclude": ["dist", "__tests__"], + "include": ["**/*.ts"], + "exclude": ["dist", "**/node_modules/**"], "compilerOptions": { "lib": ["ES2019"], "target": "ES2019", diff --git a/packages/remix-architect/tsconfig.json b/packages/remix-architect/tsconfig.json index 5dff1bb6768..af74b25d877 100644 --- a/packages/remix-architect/tsconfig.json +++ b/packages/remix-architect/tsconfig.json @@ -1,8 +1,10 @@ { - "exclude": ["dist", "__tests__"], + "include": ["**/*.ts"], + "exclude": ["dist", "__tests__", "node_modules"], "compilerOptions": { "lib": ["ES2019", "DOM.Iterable"], "target": "ES2019", + "skipLibCheck": true, "moduleResolution": "node", "allowSyntheticDefaultImports": true, diff --git a/packages/remix-cloudflare-pages/tsconfig.json b/packages/remix-cloudflare-pages/tsconfig.json index 56e769ad3f7..8b5f247723d 100644 --- a/packages/remix-cloudflare-pages/tsconfig.json +++ b/packages/remix-cloudflare-pages/tsconfig.json @@ -1,6 +1,6 @@ { "include": ["**/*.ts"], - "exclude": ["dist", "__tests__"], + "exclude": ["dist", "__tests__", "node_modules"], "compilerOptions": { "lib": ["ES2019"], "target": "ES2019", diff --git a/packages/remix-cloudflare-workers/tsconfig.json b/packages/remix-cloudflare-workers/tsconfig.json index d71018ebd1b..dc027cc628d 100644 --- a/packages/remix-cloudflare-workers/tsconfig.json +++ b/packages/remix-cloudflare-workers/tsconfig.json @@ -1,6 +1,6 @@ { "include": ["**/*.ts"], - "exclude": ["dist", "__tests__"], + "exclude": ["dist", "__tests__", "node_modules"], "compilerOptions": { "lib": ["ES2019"], "target": "ES2019", diff --git a/packages/remix-cloudflare/tsconfig.json b/packages/remix-cloudflare/tsconfig.json index 52c5c040cc4..77a288f43a8 100644 --- a/packages/remix-cloudflare/tsconfig.json +++ b/packages/remix-cloudflare/tsconfig.json @@ -1,6 +1,6 @@ { "include": ["**/*.ts"], - "exclude": ["dist", "__tests__"], + "exclude": ["dist", "__tests__", "node_modules"], "compilerOptions": { "lib": ["ES2019"], "target": "ES2019", diff --git a/packages/remix-dev/tsconfig.json b/packages/remix-dev/tsconfig.json index 972e6513349..e44e02fdac8 100644 --- a/packages/remix-dev/tsconfig.json +++ b/packages/remix-dev/tsconfig.json @@ -1,5 +1,5 @@ { - "exclude": ["dist", "__tests__", "./compiler/shims"], + "exclude": ["dist", "__tests__", "node_modules", "./compiler/shims"], "compilerOptions": { "lib": ["ES2019", "DOM.Iterable"], "target": "ES2019", diff --git a/packages/remix-express/tsconfig.json b/packages/remix-express/tsconfig.json index bf48b5c8554..64e50c9eaf1 100644 --- a/packages/remix-express/tsconfig.json +++ b/packages/remix-express/tsconfig.json @@ -1,5 +1,6 @@ { - "exclude": ["dist", "__tests__"], + "include": ["**/*.ts"], + "exclude": ["dist", "__tests__", "node_modules"], "compilerOptions": { "lib": ["ES2019", "DOM.Iterable"], "target": "ES2019", diff --git a/packages/remix-netlify/tsconfig.json b/packages/remix-netlify/tsconfig.json index 8987cf25621..7ac4b954272 100644 --- a/packages/remix-netlify/tsconfig.json +++ b/packages/remix-netlify/tsconfig.json @@ -1,8 +1,9 @@ { - "exclude": ["dist", "__tests__"], + "exclude": ["dist", "__tests__", "node_modules"], "compilerOptions": { "lib": ["ES2019", "DOM.Iterable"], "target": "ES2019", + "skipLibCheck": true, "moduleResolution": "node", "allowSyntheticDefaultImports": true, diff --git a/packages/remix-node/tsconfig.json b/packages/remix-node/tsconfig.json index 58bf7745a14..e1d4b08fd95 100644 --- a/packages/remix-node/tsconfig.json +++ b/packages/remix-node/tsconfig.json @@ -1,5 +1,6 @@ { - "exclude": ["dist", "__tests__"], + "include": ["**/*.ts"], + "exclude": ["dist", "__tests__", "node_modules"], "compilerOptions": { "lib": ["ES2019", "DOM.Iterable"], "target": "ES2019", diff --git a/packages/remix-react/tsconfig.json b/packages/remix-react/tsconfig.json index 3dcc285a15f..8c9b58bb635 100644 --- a/packages/remix-react/tsconfig.json +++ b/packages/remix-react/tsconfig.json @@ -1,9 +1,11 @@ { - "exclude": ["dist", "__tests__"], + "include": ["**/*.ts", "**/*.tsx"], + "exclude": ["dist", "__tests__", "node_modules"], "compilerOptions": { "lib": ["DOM", "DOM.Iterable", "ES2020"], "target": "ES2020", "module": "ES2020", + "skipLibCheck": true, "moduleResolution": "node", "allowSyntheticDefaultImports": true, diff --git a/packages/remix-serve/tsconfig.json b/packages/remix-serve/tsconfig.json index 5cfcffdcc5f..d867dfe1d13 100644 --- a/packages/remix-serve/tsconfig.json +++ b/packages/remix-serve/tsconfig.json @@ -1,8 +1,10 @@ { - "exclude": ["dist", "__tests__"], + "include": ["**/*.ts"], + "exclude": ["dist", "__tests__", "node_modules"], "compilerOptions": { "lib": ["ES2019", "DOM.Iterable"], "target": "ES2019", + "skipLibCheck": true, "moduleResolution": "node", "allowSyntheticDefaultImports": true, diff --git a/packages/remix-server-runtime/tsconfig.json b/packages/remix-server-runtime/tsconfig.json index d5b99c0e679..265cdafbfee 100644 --- a/packages/remix-server-runtime/tsconfig.json +++ b/packages/remix-server-runtime/tsconfig.json @@ -1,5 +1,6 @@ { - "exclude": ["dist", "__tests__"], + "include": ["**/*.ts"], + "exclude": ["dist", "__tests__", "node_modules"], "compilerOptions": { "lib": ["ES2019", "DOM", "DOM.Iterable"], "target": "ES2019", diff --git a/packages/remix-vercel/tsconfig.json b/packages/remix-vercel/tsconfig.json index fa79e1523d6..3c4a84f0ec2 100644 --- a/packages/remix-vercel/tsconfig.json +++ b/packages/remix-vercel/tsconfig.json @@ -1,8 +1,10 @@ { - "exclude": ["dist", "__tests__"], + "include": ["**/*.ts"], + "exclude": ["dist", "__tests__", "node_modules"], "compilerOptions": { "lib": ["ES2019", "DOM.Iterable"], "target": "ES2019", + "skipLibCheck": true, "moduleResolution": "node", "allowSyntheticDefaultImports": true, diff --git a/packages/remix/tsconfig.json b/packages/remix/tsconfig.json index 74b33e4464f..250fb1a79fb 100644 --- a/packages/remix/tsconfig.json +++ b/packages/remix/tsconfig.json @@ -1,9 +1,11 @@ { - "exclude": ["dist", "__tests__"], + "include": ["**/*.ts"], + "exclude": ["dist", "__tests__", "node_modules"], "compilerOptions": { "lib": ["DOM", "DOM.Iterable", "ES2020"], "target": "ES2020", "module": "ES2020", + "skipLibCheck": true, "jsx": "react", "moduleResolution": "node",