diff --git a/client/branded/tsconfig.json b/client/branded/tsconfig.json index ca19e202e1f..5d519248c0f 100644 --- a/client/branded/tsconfig.json +++ b/client/branded/tsconfig.json @@ -4,14 +4,13 @@ "jsx": "react-jsx", "module": "commonjs", "sourceRoot": "src", - "baseUrl": ".", "paths": { - "*": ["../observability-client/src/types/*", "src/types/*", "*"], + "*": ["../observability-client/src/types/*"], }, "rootDir": ".", "outDir": "./out", }, - "include": ["**/*", ".*", "./src/**/*.json"], + "include": ["src", "./src/**/*.json"], "exclude": ["../../node_modules", "./node_modules", "./out"], "references": [ { diff --git a/client/browser/tsconfig.json b/client/browser/tsconfig.json index 32f7ee111b1..5c516e5cfad 100644 --- a/client/browser/tsconfig.json +++ b/client/browser/tsconfig.json @@ -2,16 +2,15 @@ "extends": "../../tsconfig.base.json", "compilerOptions": { "module": "commonjs", - "baseUrl": ".", "paths": { - "*": ["src/types/*", "../shared/src/types/*", "../common/src/types/*", "*"], + "*": ["./src/types/*", "../shared/src/types/*", "../common/src/types/*"], }, "jsx": "react-jsx", "resolveJsonModule": true, "rootDir": ".", "outDir": "out", }, - "include": ["**/*", ".*", "src/**/*.json", "src/types/**/*.d.ts", "./code-intel-extensions.json"], + "include": ["src", "config", "gulpfile.js", "src/**/*.json", "src/types/**/*.d.ts", "./code-intel-extensions.json"], "exclude": [ "out", "node_modules", diff --git a/client/build-config/tsconfig.json b/client/build-config/tsconfig.json index 27a83aca1f6..7de2e0dd5dd 100644 --- a/client/build-config/tsconfig.json +++ b/client/build-config/tsconfig.json @@ -7,5 +7,5 @@ "outDir": "./out", "baseUrl": "./src", }, - "include": ["src", "*.js"], + "include": ["src"], } diff --git a/client/client-api/tsconfig.json b/client/client-api/tsconfig.json index 60550412a70..c2753b976e0 100644 --- a/client/client-api/tsconfig.json +++ b/client/client-api/tsconfig.json @@ -22,5 +22,5 @@ "path": "../template-parser", }, ], - "include": ["src", "*.js"], + "include": ["src"], } diff --git a/client/codeintellify/tsconfig.json b/client/codeintellify/tsconfig.json index 664aeeaa9c2..744de2e66b8 100644 --- a/client/codeintellify/tsconfig.json +++ b/client/codeintellify/tsconfig.json @@ -5,7 +5,6 @@ "sourceRoot": "src", "rootDir": ".", "outDir": "./out", - "baseUrl": "./src", }, "references": [ { @@ -15,5 +14,5 @@ "path": "../extension-api-types", }, ], - "include": ["src", "*.js"], + "include": ["src"], } diff --git a/client/common/tsconfig.json b/client/common/tsconfig.json index 1b8d963ddce..3cefd55c65e 100644 --- a/client/common/tsconfig.json +++ b/client/common/tsconfig.json @@ -5,9 +5,8 @@ "sourceRoot": "src", "rootDir": ".", "outDir": "./out", - "baseUrl": "./src", }, - "include": ["src", "*.js"], + "include": ["src"], "references": [ { "path": "../extension-api-types", diff --git a/client/http-client/tsconfig.json b/client/http-client/tsconfig.json index 51cf2864356..3b51bcd65c9 100644 --- a/client/http-client/tsconfig.json +++ b/client/http-client/tsconfig.json @@ -5,10 +5,9 @@ "sourceRoot": "src", "rootDir": ".", "outDir": "./out", - "baseUrl": "./src", "jsx": "react-jsx", }, - "include": ["src", "*.js"], + "include": ["src"], "references": [ { "path": "../common", diff --git a/client/observability-server/tsconfig.json b/client/observability-server/tsconfig.json index c1a0feae7a6..550739fdf66 100644 --- a/client/observability-server/tsconfig.json +++ b/client/observability-server/tsconfig.json @@ -5,9 +5,8 @@ "sourceRoot": "src", "rootDir": ".", "outDir": "./out", - "baseUrl": "./src", }, - "include": ["src", "*.js"], + "include": ["src"], "references": [ { "path": "../build-config", diff --git a/client/shared/dev/BUILD.bazel b/client/shared/dev/BUILD.bazel index e353f2a7e74..6883ab560cc 100644 --- a/client/shared/dev/BUILD.bazel +++ b/client/shared/dev/BUILD.bazel @@ -68,6 +68,7 @@ ts_project( name = "mock_ts", srcs = [ "mockDomRect.ts", + "mockEventLogger.ts", "mockMatchMedia.ts", "mockResizeObserver.ts", "mockSentryBrowser.ts", diff --git a/client/web/dev/mocks/mockEventLogger.ts b/client/shared/dev/mockEventLogger.ts similarity index 100% rename from client/web/dev/mocks/mockEventLogger.ts rename to client/shared/dev/mockEventLogger.ts diff --git a/client/shared/tsconfig.json b/client/shared/tsconfig.json index de88bcfc2c7..ca4ed0faaad 100644 --- a/client/shared/tsconfig.json +++ b/client/shared/tsconfig.json @@ -43,6 +43,6 @@ "path": "../wildcard", }, ], - "include": ["**/*", ".*", "./src/**/*.json"], + "include": ["src", "dev", "gulpfile.js", "./src/**/*.json"], "exclude": ["../../node_modules", "./node_modules", "./out", "./src/end-to-end"], } diff --git a/client/storybook/tsconfig.json b/client/storybook/tsconfig.json index 2f674393369..46dba1f0e20 100644 --- a/client/storybook/tsconfig.json +++ b/client/storybook/tsconfig.json @@ -25,5 +25,5 @@ "path": "../wildcard", }, ], - "include": ["src", "*.js"], + "include": ["src"], } diff --git a/client/template-parser/tsconfig.json b/client/template-parser/tsconfig.json index 27a83aca1f6..9ba55f8a3ac 100644 --- a/client/template-parser/tsconfig.json +++ b/client/template-parser/tsconfig.json @@ -5,7 +5,6 @@ "sourceRoot": "src", "rootDir": ".", "outDir": "./out", - "baseUrl": "./src", }, - "include": ["src", "*.js"], + "include": ["src"], } diff --git a/client/testing/tsconfig.json b/client/testing/tsconfig.json index 1532ece7185..3bbea9e7628 100644 --- a/client/testing/tsconfig.json +++ b/client/testing/tsconfig.json @@ -7,7 +7,6 @@ "sourceRoot": "src", "rootDir": ".", "outDir": "./out", - "baseUrl": "./src", }, - "include": ["src", "*.js"], + "include": ["src"], } diff --git a/client/web/BUILD.bazel b/client/web/BUILD.bazel index cd4a1a0329a..de55c3b208a 100644 --- a/client/web/BUILD.bazel +++ b/client/web/BUILD.bazel @@ -2094,7 +2094,6 @@ ESBUILD_CONFIG_DEPS = [ "//:node_modules/events", "//:node_modules/monaco-editor", "//:node_modules/esbuild", - "//client/web/dev", "//:node_modules/react-visibility-sensor", # required for https://github.com/joshwnj/react-visibility-sensor/issues/148 workaround "//:postcss_config_js", diff --git a/client/web/dev/BUILD.bazel b/client/web/dev/BUILD.bazel index a9f215fea4b..331e8f6375a 100644 --- a/client/web/dev/BUILD.bazel +++ b/client/web/dev/BUILD.bazel @@ -24,7 +24,6 @@ ts_project( "esbuild/manifest.ts", "esbuild/manifestPlugin.ts", "esbuild/server.ts", - "mocks/mockEventLogger.ts", "server/development.server.ts", "server/production.server.ts", "utils/constants.ts", diff --git a/client/web/dev/tsconfig.json b/client/web/dev/tsconfig.json index 22e4707a9f5..fb498622d74 100644 --- a/client/web/dev/tsconfig.json +++ b/client/web/dev/tsconfig.json @@ -3,5 +3,6 @@ "compilerOptions": { "module": "commonjs", }, - "include": ["**/*"], + "include": ["esbuild", "server", "utils", "../src/jscontext.ts", "../src/graphql-operations.ts"], + "exclude": [], } diff --git a/client/web/jest.config.js b/client/web/jest.config.js index e1cfd93fb1a..97aa50c1b2e 100644 --- a/client/web/jest.config.js +++ b/client/web/jest.config.js @@ -8,7 +8,7 @@ const exportedConfig = { ...config, displayName: 'web', rootDir: __dirname, - setupFiles: [...config.setupFiles, path.join(__dirname, 'dev/mocks/mockEventLogger.ts')], + setupFiles: [...config.setupFiles, path.join(__dirname, '../shared/dev/mockEventLogger.ts')], } module.exports = exportedConfig diff --git a/client/web/tsconfig.json b/client/web/tsconfig.json index b397a53abef..767690289cc 100644 --- a/client/web/tsconfig.json +++ b/client/web/tsconfig.json @@ -51,8 +51,16 @@ "path": "../wildcard", }, ], - "include": ["**/*", ".*", "./src/**/*.json"], - "exclude": ["../../node_modules", "./node_modules", "./out", "src/end-to-end", "src/regression", "src/integration"], + "include": ["src", "scripts", "./src/**/*.json"], + "exclude": [ + "dev", + "../../node_modules", + "./node_modules", + "./out", + "src/end-to-end", + "src/regression", + "src/integration", + ], "ts-node": { "moduleTypes": { "scripts/**/*": "cjs", diff --git a/client/wildcard/BUILD.bazel b/client/wildcard/BUILD.bazel index 454b4b64fa8..931ccf35313 100644 --- a/client/wildcard/BUILD.bazel +++ b/client/wildcard/BUILD.bazel @@ -119,7 +119,6 @@ copy_to_bin( ts_project( name = "wildcard_lib", srcs = [ - "globals.d.ts", "src/components/Alert/Alert.tsx", "src/components/Alert/AlertLink.tsx", "src/components/Alert/constants.ts", @@ -377,6 +376,7 @@ ts_project( "src/global-styles/GlobalStylesStory/TextVariants/index.ts", "src/global-styles/GlobalStylesStory/constants.ts", "src/global-styles/GlobalStylesStory/utils.ts", + "src/globals.d.ts", "src/hooks/index.ts", "src/hooks/useAccordion.ts", "src/hooks/useAutoFocus.ts", diff --git a/client/wildcard/globals.d.ts b/client/wildcard/src/globals.d.ts similarity index 100% rename from client/wildcard/globals.d.ts rename to client/wildcard/src/globals.d.ts diff --git a/client/wildcard/tsconfig.json b/client/wildcard/tsconfig.json index 6903e4f8d59..d45bab2c57c 100644 --- a/client/wildcard/tsconfig.json +++ b/client/wildcard/tsconfig.json @@ -12,6 +12,6 @@ "outDir": "./out", }, "references": [{ "path": "../common" }, { "path": "../testing" }], - "include": ["**/*", ".*"], + "include": ["src"], "exclude": ["../../node_modules", "./node_modules", "./out"], }