|
1 | 1 | { |
2 | | - "extends": "@mongodb-js/tsconfig-devtools/tsconfig.common.json", |
3 | 2 | "compilerOptions": { |
| 3 | + // Copy of https://www.npmjs.com/package/@tsconfig/node24 + DOM as we're a |
| 4 | + // mixed runtime environment |
4 | 5 | "module": "nodenext", |
5 | 6 | "moduleResolution": "nodenext", |
6 | | - // Defaults would do, but tsconfig-devtools overrides it to less preferable |
7 | | - // values |
8 | | - // |
9 | | - // https://www.npmjs.com/package/@tsconfig/node22 + DOM |
10 | 7 | "lib": [ |
11 | 8 | "es2024", |
12 | 9 | "ESNext.Array", |
|
17 | 14 | "DOM.AsyncIterable", |
18 | 15 | "ESNext.Disposable" |
19 | 16 | ], |
20 | | - "target": "es2022", |
21 | | - "removeComments": false, |
| 17 | + "target": "es2024", |
| 18 | + "strict": true, |
| 19 | + "esModuleInterop": true, |
| 20 | + "skipLibCheck": true, |
| 21 | + // ------ |
| 22 | + |
| 23 | + // Compass-specific config |
| 24 | + "outDir": "${configDir}/dist", |
| 25 | + "forceConsistentCasingInFileNames": true, |
22 | 26 | "erasableSyntaxOnly": true, |
23 | 27 | // Most of our code uses React / jsx |
24 | 28 | "jsx": "react", |
25 | 29 | // Still a handful of js files in the monorepo |
26 | 30 | "allowJs": true, |
27 | 31 | // Allows to run TypeScript code directly with node |
28 | 32 | "allowImportingTsExtensions": true, |
29 | | - "noEmit": true |
| 33 | + // "Common" config is not meant for building the distribution assets |
| 34 | + "noEmit": true, |
| 35 | + // ------ |
| 36 | + |
| 37 | + // TS6+ requires explicit rootDir to be set, for common config it's just the |
| 38 | + // root of the package |
| 39 | + "rootDir": "${configDir}/.", |
| 40 | + // TS6+ doesn't autoresolve @types packages unless explicitly asked to do |
| 41 | + // so. Autoresolution makes the builds slower, but is convenient. We might |
| 42 | + // want to revisit this and set up an explicit list, for the initial update |
| 43 | + // we're restoring old behavior |
| 44 | + "types": ["*"] |
30 | 45 | } |
31 | 46 | } |
0 commit comments