[TRI-2209] CLI init: If there's no `include` in the `tsconfig.ts` file then don't add `trigger.config.ts` to it (v3)
matt-aitken opened this issue · comments
If you don't have include
in your tsconfig.json
TypeScript includes all TypeScript files inside the project directory.
Currently our CLI adds trigger.config.ts
to include
always.
{
"extends": "@tsconfig/node18/tsconfig.json",
"compilerOptions": {
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"jsx": "preserve",
"noUncheckedIndexedAccess": true
},
"include": ["trigger.config.ts"] // <= this is the newly added line
}
This breaks TypeScript for every other files because now they don't match anymore.
Fix
If there's no existing include then don't add trigger.config.ts
.