From 7701edb0bbadf9943c03a997c441d09351c7aeee Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Mon, 3 Mar 2025 15:53:28 -0300 Subject: [PATCH] chore: TS config - ignore node_modules in subdirectories (#19680) * chore: TS config - ignore node_modules in subdirectories * Update tsconfig.json * Applied the pattern to the entire monorepo --- apps/api/v1/tsconfig.json | 2 +- apps/storybook/tsconfig.json | 2 +- apps/swagger/tsconfig.json | 2 +- apps/web/tsconfig.json | 2 +- example-apps/credential-sync/tsconfig.json | 2 +- packages/app-store/tsconfig.json | 2 +- packages/debugging/tsconfig.json | 2 +- packages/embeds/embed-core/tsconfig.json | 2 +- packages/embeds/embed-react/tsconfig.json | 2 +- packages/embeds/embed-snippet/tsconfig.json | 2 +- packages/features/tsconfig.json | 2 +- packages/lib/tsconfig.json | 2 +- packages/platform/atoms/tsconfig.json | 2 +- packages/platform/constants/tsconfig.json | 2 +- packages/platform/enums/tsconfig.json | 2 +- packages/platform/examples/base/tsconfig.json | 2 +- packages/platform/libraries/tsconfig.json | 2 +- packages/platform/types/tsconfig.json | 2 +- packages/platform/utils/tsconfig.json | 2 +- packages/types/tsconfig.json | 2 +- packages/ui/tsconfig.json | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/apps/api/v1/tsconfig.json b/apps/api/v1/tsconfig.json index ba4060d01f..e1f5e1e943 100644 --- a/apps/api/v1/tsconfig.json +++ b/apps/api/v1/tsconfig.json @@ -18,5 +18,5 @@ "../../../packages/types/*.d.ts", "../../../packages/types/next-auth.d.ts" ], - "exclude": ["node_modules", "templates", "auth"] + "exclude": ["**/node_modules/**", "templates", "auth"] } diff --git a/apps/storybook/tsconfig.json b/apps/storybook/tsconfig.json index 67c171730a..5537ae35ea 100644 --- a/apps/storybook/tsconfig.json +++ b/apps/storybook/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "@calcom/tsconfig/nextjs.json", "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], - "exclude": ["node_modules"], + "exclude": ["**/node_modules/**"], "compilerOptions": { "noImplicitAny": false, "baseUrl": "." diff --git a/apps/swagger/tsconfig.json b/apps/swagger/tsconfig.json index 053c5a63af..cb04d6ea77 100644 --- a/apps/swagger/tsconfig.json +++ b/apps/swagger/tsconfig.json @@ -13,5 +13,5 @@ "**/*.ts", "**/*.tsx" ], - "exclude": ["node_modules"] + "exclude": ["**/node_modules/**"] } diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index eae67c4e7c..cd5a2fe7cb 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -34,5 +34,5 @@ "../../packages/features/bookings/lib/getUserBooking.ts", "../../packages/features/Segment.tsx" ], - "exclude": ["node_modules", ".next"] + "exclude": ["**/node_modules/**", ".next"] } diff --git a/example-apps/credential-sync/tsconfig.json b/example-apps/credential-sync/tsconfig.json index 093985aafb..2403cbbe38 100644 --- a/example-apps/credential-sync/tsconfig.json +++ b/example-apps/credential-sync/tsconfig.json @@ -15,5 +15,5 @@ "jsx": "preserve" }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], - "exclude": ["node_modules"] + "exclude": ["**/node_modules/**"] } diff --git a/packages/app-store/tsconfig.json b/packages/app-store/tsconfig.json index 8e9faeb56e..cacd085f24 100644 --- a/packages/app-store/tsconfig.json +++ b/packages/app-store/tsconfig.json @@ -1,6 +1,6 @@ { "extends": "@calcom/tsconfig/react-library.json", - "exclude": ["dist", "build", "node_modules"], + "exclude": ["dist", "build", "**/node_modules/**"], "compilerOptions": { "baseUrl": ".", "paths": { diff --git a/packages/debugging/tsconfig.json b/packages/debugging/tsconfig.json index 4b507010c5..13eb55797f 100644 --- a/packages/debugging/tsconfig.json +++ b/packages/debugging/tsconfig.json @@ -10,5 +10,5 @@ "**/*.ts", "**/*.tsx" ], - "exclude": ["dist", "build", "node_modules"] + "exclude": ["dist", "build", "**/node_modules/**"] } diff --git a/packages/embeds/embed-core/tsconfig.json b/packages/embeds/embed-core/tsconfig.json index b8e3b55b65..a4f4daf98c 100644 --- a/packages/embeds/embed-core/tsconfig.json +++ b/packages/embeds/embed-core/tsconfig.json @@ -13,5 +13,5 @@ } }, "include": ["src", "env.d.ts", "index.ts", "*.ts"], - "exclude": ["dist", "build", "node_modules"] + "exclude": ["dist", "build", "**/node_modules/**"] } diff --git a/packages/embeds/embed-react/tsconfig.json b/packages/embeds/embed-react/tsconfig.json index 5d5e3df994..38cbe05643 100644 --- a/packages/embeds/embed-react/tsconfig.json +++ b/packages/embeds/embed-react/tsconfig.json @@ -15,5 +15,5 @@ }, "include": ["src/**/*.ts", "src/**/*.tsx", "env.d.ts", "*.tsx", "*.ts"], // Exclude "test" because that has `api.test.ts` which imports @calcom/embed-react which needs it to be built using this tsconfig.json first. Excluding it here prevents type-check from validating test folder - "exclude": ["node_modules", "test"] + "exclude": ["**/node_modules/**", "test"] } diff --git a/packages/embeds/embed-snippet/tsconfig.json b/packages/embeds/embed-snippet/tsconfig.json index b2907d9204..2444a8dde5 100644 --- a/packages/embeds/embed-snippet/tsconfig.json +++ b/packages/embeds/embed-snippet/tsconfig.json @@ -13,5 +13,5 @@ } }, "include": ["."], - "exclude": ["dist", "build", "node_modules"] + "exclude": ["dist", "build", "**/node_modules/**"] } diff --git a/packages/features/tsconfig.json b/packages/features/tsconfig.json index 2943b44c34..cb1dca08fa 100644 --- a/packages/features/tsconfig.json +++ b/packages/features/tsconfig.json @@ -9,5 +9,5 @@ "esModuleInterop": true }, "include": [".", "../types/next-auth.d.ts", "../types/tanstack-table.d.ts"], - "exclude": ["dist", "build", "node_modules", "**/*.test.*", "**/__mocks__/*", "**/__tests__/*"] + "exclude": ["dist", "build", "**/node_modules/**", "**/*.test.*", "**/__mocks__/*", "**/__tests__/*"] } diff --git a/packages/lib/tsconfig.json b/packages/lib/tsconfig.json index 3e1af49b0b..2f80407113 100644 --- a/packages/lib/tsconfig.json +++ b/packages/lib/tsconfig.json @@ -6,5 +6,5 @@ "resolveJsonModule": true }, "include": [".", "../types/next-auth.d.ts", "../types/window.d.ts", "../trpc/types/router.d.ts"], - "exclude": ["dist", "build", "node_modules"] + "exclude": ["dist", "build", "**/node_modules/**"] } diff --git a/packages/platform/atoms/tsconfig.json b/packages/platform/atoms/tsconfig.json index f371062968..d1ec2ea833 100644 --- a/packages/platform/atoms/tsconfig.json +++ b/packages/platform/atoms/tsconfig.json @@ -45,7 +45,7 @@ "exclude": [ "dist", "build", - "node_modules", + "**/node_modules/**", "**/*WebWrapper.tsx", "**/*.docs.mdx", "**/*.stories.tsx", diff --git a/packages/platform/constants/tsconfig.json b/packages/platform/constants/tsconfig.json index aff8a17209..129d25f1c1 100644 --- a/packages/platform/constants/tsconfig.json +++ b/packages/platform/constants/tsconfig.json @@ -7,5 +7,5 @@ "outDir": "./dist" }, "include": ["."], - "exclude": ["dist", "node_modules"] + "exclude": ["dist", "**/node_modules/**"] } diff --git a/packages/platform/enums/tsconfig.json b/packages/platform/enums/tsconfig.json index 18374f0d19..c6e4a12552 100644 --- a/packages/platform/enums/tsconfig.json +++ b/packages/platform/enums/tsconfig.json @@ -8,5 +8,5 @@ "outDir": "./dist" }, "include": ["."], - "exclude": ["dist", "node_modules"] + "exclude": ["dist", "**/node_modules/**"] } diff --git a/packages/platform/examples/base/tsconfig.json b/packages/platform/examples/base/tsconfig.json index cdd585164d..566fe96733 100644 --- a/packages/platform/examples/base/tsconfig.json +++ b/packages/platform/examples/base/tsconfig.json @@ -19,5 +19,5 @@ "forceConsistentCasingInFileNames": true }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], - "exclude": ["node_modules"] + "exclude": ["**/node_modules/**"] } diff --git a/packages/platform/libraries/tsconfig.json b/packages/platform/libraries/tsconfig.json index 1aa7037998..4bedb18d6d 100644 --- a/packages/platform/libraries/tsconfig.json +++ b/packages/platform/libraries/tsconfig.json @@ -14,7 +14,7 @@ "exclude": [ "dist", "build", - "node_modules", + "**/node_modules/**", "**/*.test.*", "**/__mocks__/*", "**/__tests__/*", diff --git a/packages/platform/types/tsconfig.json b/packages/platform/types/tsconfig.json index 928fcc3c34..856bd09876 100644 --- a/packages/platform/types/tsconfig.json +++ b/packages/platform/types/tsconfig.json @@ -8,5 +8,5 @@ "outDir": "dist" }, "include": [".", "../../types/business-days-plugin.d.ts", "../../types/window.d.ts"], - "exclude": ["dist", "build", "node_modules"] + "exclude": ["dist", "build", "**/node_modules/**"] } diff --git a/packages/platform/utils/tsconfig.json b/packages/platform/utils/tsconfig.json index 2038a9108e..ba98db2d60 100644 --- a/packages/platform/utils/tsconfig.json +++ b/packages/platform/utils/tsconfig.json @@ -9,5 +9,5 @@ "experimentalDecorators": true }, "include": [".", "./tests", "../../types/business-days-plugin.d.ts", "../../types/window.d.ts"], - "exclude": ["dist", "build", "node_modules", "**/*.test.*", "**/__mocks__/*", "**/__tests__/*"] + "exclude": ["dist", "build", "**/node_modules/**", "**/*.test.*", "**/__mocks__/*", "**/__tests__/*"] } diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json index f9701e8ae8..b71c285bbb 100644 --- a/packages/types/tsconfig.json +++ b/packages/types/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "@calcom/tsconfig/base.json", "include": ["."], - "exclude": ["dist", "build", "node_modules"] + "exclude": ["dist", "build", "**/node_modules/**"] } diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json index 389b3daa39..cf5b665456 100644 --- a/packages/ui/tsconfig.json +++ b/packages/ui/tsconfig.json @@ -11,5 +11,5 @@ "**/*.ts", "**/*.tsx" ], - "exclude": ["dist", "build", "node_modules"] + "exclude": ["dist", "build", "**/node_modules/**"] }