mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
9db9b8eff1
tsec enforces nothing today. Of its 22 rules, 16 have no callsite in the four packages it checks, 5 find violations that are all suppressed by tsec-exemptions.json, and ban-element-innerhtml-assignments has been inert since TypeScript dropped the `InnerHTML` mixin from lib.dom.d.ts, so its matcher resolves to no type. Net enforced findings: zero. font, third-parties and next-playwright never extended tsconfig-tsec.json, so they ran all 22 rules over source with no DOM sinks at all, paying a full extra type-check each for nothing.
50 lines
1.6 KiB
JSON
50 lines
1.6 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"strict": true,
|
|
"stripInternal": true,
|
|
"esModuleInterop": true,
|
|
"verbatimModuleSyntax": true,
|
|
"jsx": "react-jsx",
|
|
"module": "ESNext",
|
|
"target": "ES2018",
|
|
"moduleResolution": "bundler",
|
|
"types": ["trusted-types", "jest", "node"],
|
|
"paths": {
|
|
// Required absolute paths.
|
|
// We rewrite these here so that they aren't also input files which would fail tsc with
|
|
// "Cannot write file ... because it would overwrite input file."
|
|
// Also has the benefit of enabling auto-completion before build.
|
|
"next/dist/client/app-find-source-map-url": [
|
|
"./src/client/app-find-source-map-url.ts"
|
|
],
|
|
"next/dist/client/app-call-server": ["./src/client/app-call-server.ts"],
|
|
"next/dist/compiled/@edge-runtime/ponyfill": [
|
|
"./src/compiled/@edge-runtime/ponyfill"
|
|
],
|
|
"next/dist/compiled/@vercel/og/satori": [
|
|
"./src/compiled/@vercel/og/satori"
|
|
],
|
|
// TODO: Enable types by telling Turbopack to ignore this alias.
|
|
// tsconfig#paths are for type locations not source locations.
|
|
// "next/dist/compiled/next-devtools": [
|
|
// "./src/next-devtools/entrypoint.ts"
|
|
// ],
|
|
"next/dist/shared/lib/image-loader": ["./src/shared/lib/image-loader.ts"]
|
|
}
|
|
},
|
|
// When changing `exclude`, also update
|
|
// `tsconfig.build.json`.
|
|
"exclude": [
|
|
"./dist/**/*",
|
|
"./*.d.ts",
|
|
"future/*.d.ts",
|
|
"image-types/global.d.ts",
|
|
"compat/*.d.ts",
|
|
"legacy/*.d.ts",
|
|
"types/compiled.d.ts",
|
|
"navigation-types/*.d.ts",
|
|
"navigation-types/compat/*.d.ts",
|
|
"experimental/**/*.d.ts"
|
|
]
|
|
}
|