From f61ad75e201576f7458b00befac6d896a3b83c54 Mon Sep 17 00:00:00 2001 From: JF-Cozy Date: Thu, 9 Apr 2026 14:05:51 +0200 Subject: [PATCH] feat(cozy-tsconfig): Remove declarationDir and outDir BREAKING CHANGE: You must define `declarationDir` and `outDir` in `compilerOptions` manually --- packages/cozy-tsconfig/tsconfig.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/cozy-tsconfig/tsconfig.json b/packages/cozy-tsconfig/tsconfig.json index e3b2ed7545..f38d3e3d53 100644 --- a/packages/cozy-tsconfig/tsconfig.json +++ b/packages/cozy-tsconfig/tsconfig.json @@ -12,7 +12,9 @@ "allowJs": true, // Disable if you don't have any .js files or if you have too many errors "allowSyntheticDefaultImports": true, "declaration": true, - "declarationDir": "dist", // Included by default but won't emit anything as long as `tsc` is not run, can be overwritten + // "declarationDir": "./dist" is intentionally omitted - when extending this config, + // TypeScript resolves relative paths from the config file location, not the project root. + // Define "declarationDir" in your project's tsconfig.json instead. "emitDeclarationOnly": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, @@ -26,7 +28,9 @@ "module": "esnext", "moduleResolution": "bundler", "noFallthroughCasesInSwitch": true, - "outDir": "dist", // Best to include it by default to avoid errors like "Cannot write file 'src/foobar.d.ts' because it would overwrite input file." + // "outDir": "./dist" is intentionally omitted - when extending this config, + // TypeScript resolves relative paths from the config file location, not the project root. + // Define "outDir" in your project's tsconfig.json instead. "resolveJsonModule": true, "skipLibCheck": true, "strict": true, // Disable if you have too many errors