diff --git a/.vscode/buster.code-workspace b/.vscode/buster.code-workspace deleted file mode 100644 index fcad96c99..000000000 --- a/.vscode/buster.code-workspace +++ /dev/null @@ -1,19 +0,0 @@ -{ - "folders": [ - { "path": ".." }, - { "path": "../apps/web" } - ], - "settings": { - "editor.defaultFormatter": "biomejs.biome", - "editor.formatOnSave": true, - "editor.codeActionsOnSave": { - "quickfix.biome": "explicit", - "source.organizeImports.biome": "explicit" - }, - "typescript.preferences.importModuleSpecifier": "relative", - "typescript.suggest.autoImports": true, - "typescript.updateImportsOnFileMove.enabled": "always", - "vitest.maximumConfigs": 25 - } - } - \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 4f727b587..b5aec9aab 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,6 +9,50 @@ "typescript.suggest.autoImports": true, "typescript.updateImportsOnFileMove.enabled": "always", + // Ensure dist folders are NEVER excluded from file watching + "files.watcherExclude": { + "**/node_modules/**": true, + "**/.git/objects/**": true, + "**/.git/subtree-cache/**": true, + "**/target/**": true, + "**/.turbo/**": true + }, + + // Exclude dist folders from file explorer (but keep them in watcher) + "files.exclude": { + "**/.git": true, + "**/node_modules": false, + "**/.turbo": true, + "**/dist": true + }, + + // Exclude dist folders from search (but keep them in watcher) + "search.exclude": { + "**/node_modules": true, + "**/.git": true, + "**/.turbo": true, + "**/dist": true + }, + + // Enhanced TypeScript settings for monorepo cross-package type checking + "typescript.preferences.includePackageJsonAutoImports": "on", + "typescript.suggest.includeCompletionsForModuleExports": true, + "typescript.suggest.includeAutomaticOptionalChainCompletions": true, + "typescript.preferences.enableRenameShorthandProperties": true, + "typescript.workspaceSymbols.scope": "allOpenProjects", + "typescript.references.enabled": true, + "typescript.implementationsCodeLens.enabled": true, + "typescript.referencesCodeLens.enabled": true, + "typescript.referencesCodeLens.showOnAllFunctions": true, + + // Force proactive type checking across all files + "typescript.validate.enable": true, + "typescript.format.enable": true, + "typescript.check.npmIsInstalled": false, + "typescript.disableAutomaticTypeAcquisition": true, + "typescript.experimental.aiCodeActions": "on", + "typescript.experimental.includePackageJsonAutoImports": "on", + // Default Biome formatting for all file types "[typescript]": { "editor.defaultFormatter": "biomejs.biome" diff --git a/apps/web/src/context/BusterAppLayout/AppLayoutProvider.test.tsx b/apps/web/src/context/BusterAppLayout/AppLayoutProvider.test.tsx index 695c4295b..c7a5dd7cb 100644 --- a/apps/web/src/context/BusterAppLayout/AppLayoutProvider.test.tsx +++ b/apps/web/src/context/BusterAppLayout/AppLayoutProvider.test.tsx @@ -30,14 +30,14 @@ describe('useAppLayout - onChangePage', () => { originalHistory = window.history; // Mock window.location - (window as any).location = undefined; - window.location = { + delete (window as any).location; + (window as any).location = { ...originalLocation, href: 'http://localhost:3000', origin: 'http://localhost:3000', pathname: '/', search: '' - } as Location; + }; // Mock window.history (window as any).history = undefined; @@ -49,7 +49,7 @@ describe('useAppLayout - onChangePage', () => { afterEach(() => { vi.clearAllMocks(); - window.location = originalLocation; + (window as any).location = originalLocation; window.history = originalHistory; }); @@ -242,14 +242,14 @@ describe('useAppLayout - onChangeQueryParams', () => { originalHistory = window.history; // Mock window.location - (window as any).location = undefined; - window.location = { + delete (window as any).location; + (window as any).location = { ...originalLocation, href: 'http://localhost:3000', origin: 'http://localhost:3000', pathname: '/', search: '' - } as Location; + }; // Mock window.history (window as any).history = undefined; @@ -261,8 +261,8 @@ describe('useAppLayout - onChangeQueryParams', () => { afterEach(() => { vi.clearAllMocks(); - window.location = originalLocation; - window.history = originalHistory; + (window as any).location = originalLocation; + (window as any).history = originalHistory; }); it('should add new query parameters while preserving existing ones', () => { diff --git a/buster.code-workspace b/buster.code-workspace new file mode 100644 index 000000000..427cfe983 --- /dev/null +++ b/buster.code-workspace @@ -0,0 +1,59 @@ +{ + "folders": [ + { "path": "." }, + { "path": "./apps/api" }, + { "path": "./apps/electric-server" }, + { "path": "./apps/server" }, + { "path": "./apps/trigger" }, + { "path": "./apps/web" }, + { "path": "./packages/access-controls" }, + { "path": "./packages/ai" }, + { "path": "./packages/data-source" }, + { "path": "./packages/database" }, + { "path": "./packages/rerank" }, + { "path": "./packages/server-shared" }, + { "path": "./packages/slack" }, + { "path": "./packages/stored-values" }, + { "path": "./packages/supabase" }, + { "path": "./packages/test-utils" }, + { "path": "./packages/typescript-config" }, + { "path": "./packages/vitest-config" }, + { "path": "./packages/web-tools" } + ], + "settings": { + "editor.defaultFormatter": "biomejs.biome", + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "quickfix.biome": "explicit", + "source.organizeImports.biome": "explicit" + }, + "typescript.preferences.importModuleSpecifier": "relative", + "typescript.suggest.autoImports": true, + "typescript.updateImportsOnFileMove.enabled": "always", + "typescript.preferences.importTypeKeyword": "force", + "vitest.maximumConfigs": 25, + + // Enhanced TypeScript settings for monorepo + "typescript.preferences.includePackageJsonAutoImports": "on", + "typescript.suggest.includeCompletionsForModuleExports": true, + "typescript.workspaceSymbols.scope": "allOpenProjects", + "typescript.references.enabled": true, + "typescript.implementationsCodeLens.enabled": true, + "typescript.referencesCodeLens.enabled": true, + "typescript.referencesCodeLens.showOnAllFunctions": true, + "typescript.validate.enable": true, + "typescript.format.enable": true, + + // Force TypeScript to check all files proactively + "typescript.disableAutomaticTypeAcquisition": true, + "typescript.preferences.noSemicolons": false + }, + "extensions": { + "recommendations": [ + "biomejs.biome", + "vitest.explorer", + "esbenp.prettier-vscode" + ] + } +} + \ No newline at end of file