Skip to content

Commit d9a9c52

Browse files
feat!: increase generated tsconfig.json strictness (#3204)
1 parent 7be7634 commit d9a9c52

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

src/core/build/types.ts

+14-9
Original file line numberDiff line numberDiff line change
@@ -190,19 +190,24 @@ export async function writeTypes(nitro: Nitro) {
190190
const tsconfigDir = dirname(tsConfigPath);
191191
const tsConfig: TSConfig = defu(nitro.options.typescript.tsConfig, {
192192
compilerOptions: {
193-
forceConsistentCasingInFileNames: true,
194-
strict: nitro.options.typescript.strict,
195-
noEmit: true,
193+
/* Base options: */
194+
esModuleInterop: true,
195+
allowSyntheticDefaultImports: true,
196+
skipLibCheck: true,
196197
target: "ESNext",
197-
module: "ESNext",
198-
moduleResolution:
199-
nitro.options.experimental.typescriptBundlerResolution === false
200-
? "Node"
201-
: "Bundler",
202198
allowJs: true,
203199
resolveJsonModule: true,
200+
moduleDetection: "force",
201+
isolatedModules: true,
202+
verbatimModuleSyntax: true,
203+
/* Strictness */
204+
strict: nitro.options.typescript.strict,
205+
noUncheckedIndexedAccess: true,
206+
noImplicitOverride: true,
207+
forceConsistentCasingInFileNames: true,
208+
/* If NOT transpiling with TypeScript: */
209+
module: "Preserve",
204210
jsx: "preserve",
205-
allowSyntheticDefaultImports: true,
206211
jsxFactory: "h",
207212
jsxFragmentFactory: "Fragment",
208213
paths: {

0 commit comments

Comments
 (0)