mirror of
https://github.com/go-gitea/gitea
synced 2025-12-06 21:08:25 +00:00
In preparation to work on enabling https://www.typescriptlang.org/tsconfig/#strictNullChecks, I fixed all the issues outside of `web_src` that came up when the option was enabled. There was also one lint issue in web_src that apparently only came up with the option enabled, so I fixed that as well. `isTruthy` is introduced because Typescript has a bug regarding `filter(Boolean)` which they are seemingly unwilling to fix. --------- Signed-off-by: silverwind <me@silverwind.io>
53 lines
1.4 KiB
JSON
53 lines
1.4 KiB
JSON
{
|
|
"include": [
|
|
"${configDir}/*",
|
|
"${configDir}/.*",
|
|
"${configDir}/tests/e2e/**/*",
|
|
"${configDir}/tests/e2e/**/.*",
|
|
"${configDir}/tools/**/*",
|
|
"${configDir}/tools/**/.*",
|
|
"${configDir}/web_src/js/**/*",
|
|
"${configDir}/web_src/js/**/.*",
|
|
],
|
|
"compilerOptions": {
|
|
"target": "es2020",
|
|
"module": "esnext",
|
|
"moduleResolution": "bundler",
|
|
"lib": ["dom", "dom.iterable", "dom.asynciterable", "esnext"],
|
|
"allowImportingTsExtensions": true,
|
|
"allowJs": true,
|
|
"allowSyntheticDefaultImports": true,
|
|
"allowUnreachableCode": false,
|
|
"allowUnusedLabels": false,
|
|
"alwaysStrict": true,
|
|
"erasableSyntaxOnly": true,
|
|
"esModuleInterop": true,
|
|
"exactOptionalPropertyTypes": false,
|
|
"isolatedModules": true,
|
|
"libReplacement": false,
|
|
"noEmit": true,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"noImplicitAny": true,
|
|
"noImplicitReturns": true,
|
|
"noImplicitThis": true,
|
|
"noPropertyAccessFromIndexSignature": false,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"resolveJsonModule": true,
|
|
"skipLibCheck": true,
|
|
"sourceMap": true,
|
|
"strict": false,
|
|
"strictBindCallApply": true,
|
|
"strictBuiltinIteratorReturn": true,
|
|
"strictFunctionTypes": true,
|
|
"strictNullChecks": false,
|
|
"stripInternal": true,
|
|
"verbatimModuleSyntax": true,
|
|
"types": [
|
|
"vitest/globals",
|
|
"./web_src/js/globals.d.ts",
|
|
"./types.d.ts",
|
|
],
|
|
}
|
|
}
|