Skip to content

Commit

Permalink
feat!: increase generated tsconfig.json strictness (nitrojs#2533)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored and davidstackio committed Aug 7, 2024
1 parent 2355002 commit d678b52
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions src/core/build/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,19 +190,31 @@ declare module "nitro/types" {
const tsconfigDir = dirname(tsConfigPath);
const tsConfig: TSConfig = defu(nitro.options.typescript.tsConfig, {
compilerOptions: {
forceConsistentCasingInFileNames: true,
strict: nitro.options.typescript.strict,
noEmit: true,
/* Base options: */
esModuleInterop: true,
allowSyntheticDefaultImports: true,
skipLibCheck: true,
target: "ESNext",
allowJs: true,
resolveJsonModule: true,
moduleDetection: "force",
isolatedModules: true,
verbatimModuleSyntax: true,
/* Strictness */
strict: nitro.options.typescript.strict,
noUncheckedIndexedAccess: true,
noImplicitOverride: true,
forceConsistentCasingInFileNames: true,
/* If NOT transpiling with TypeScript: */
// TODO: consider using 'module: preserve' (requires TS 5.4+)
module: "ESNext",
noEmit: true,
moduleResolution:
nitro.options.experimental.typescriptBundlerResolution === false
? "Node"
: "Bundler",
allowJs: true,
resolveJsonModule: true,
/* JSX support */
jsx: "preserve",
allowSyntheticDefaultImports: true,
jsxFactory: "h",
jsxFragmentFactory: "Fragment",
paths: {
Expand Down

0 comments on commit d678b52

Please sign in to comment.