Skip to content

Commit 2ca8021

Browse files
danielroepi0
authored andcommitted
chore: improve internal tsconfig.json (#2529)
1 parent b341cc0 commit 2ca8021

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

src/presets/netlify/legacy/runtime/netlify.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import "#nitro-internal-pollyfills";
22
import "./_deno-env-polyfill";
3-
import type { Handler } from "@netlify/functions/dist/main";
3+
import type { Handler } from "@netlify/functions";
44
import { getRouteRulesForPath } from "nitropack/runtime/internal";
55
import { withQuery } from "ufo";
66
import { lambda } from "./netlify-lambda";

tsconfig.json

+15-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,28 @@
11
{
22
"compilerOptions": {
3+
/* Base options: */
34
"esModuleInterop": false,
45
"allowSyntheticDefaultImports": true,
56
"skipLibCheck": true,
6-
"lib": ["WebWorker", "DOM.Iterable"],
7-
"target": "ESNext",
8-
"module": "ESNext",
9-
"moduleResolution": "Node",
10-
"strict": true,
7+
"target": "es2022",
118
"allowJs": true,
129
"resolveJsonModule": true,
10+
"moduleDetection": "force",
11+
"isolatedModules": true,
12+
"verbatimModuleSyntax": true,
13+
/* Strictness */
14+
"strict": true,
15+
// TODO: enable noUncheckedIndexedAccess in subsequent PR
16+
// "noUncheckedIndexedAccess": true,
17+
"forceConsistentCasingInFileNames": true,
18+
"noImplicitOverride": true,
19+
/* If NOT transpiling with TypeScript: */
20+
"module": "preserve",
21+
"noEmit": true,
1322
"jsx": "preserve",
1423
"jsxFactory": "h",
1524
"jsxFragmentFactory": "Fragment",
16-
"noEmit": true,
25+
"lib": ["es2022", "webworker", "dom.iterable"],
1726
"paths": {
1827
// CLI
1928
"nitro/cli": ["./src/cli"],

0 commit comments

Comments
 (0)