mirror of
https://github.com/github/codeql-action.git
synced 2026-04-25 16:28:48 +00:00
212e28374b
tsconfig changes: - Specify `moduleResolution: bundler` since we use a bundler - Specify `types: ["node"]` to speed up build - Remove `alwaysStrict` as this is now deprecated - Specify `skipLibCheck: true` to speed up build - Specify Octokit types.d.ts path manually to address compiler not being able to find types with `moduleResolution: bundler`
42 lines
2.3 KiB
JSON
42 lines
2.3 KiB
JSON
{
|
|
"compilerOptions": {
|
|
/* Basic Options */
|
|
"lib": ["ES2022"],
|
|
"target": "ES2022",
|
|
"module": "commonjs",
|
|
"moduleResolution": "bundler",
|
|
"outDir": "./build",
|
|
"rootDir": "./src",
|
|
"sourceMap": true,
|
|
"types": ["node"],
|
|
|
|
/* Strict Type-Checking Options */
|
|
"strict": true, /* Enable all strict type-checking options. */
|
|
"noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */
|
|
"strictNullChecks": true, /* Enable strict null checks. */
|
|
"strictFunctionTypes": true, /* Enable strict checking of function types. */
|
|
"strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
|
"strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
|
"noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
|
|
|
/* Additional Checks */
|
|
"noUnusedLocals": false, /* Report errors on unused locals. */
|
|
"noUnusedParameters": false, /* Report errors on unused parameters. */
|
|
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
|
|
/* Module Resolution Options */
|
|
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
"resolveJsonModule": true,
|
|
"skipLibCheck": true,
|
|
// @actions/github imports this path from @octokit/core but it's not in @octokit/core's
|
|
// exports map (only "@octokit/core/types" is). Under moduleResolution: "bundler", TypeScript
|
|
// checks exports maps and can't find it, causing all GitHub/Octokit types to degrade to `any`.
|
|
// This paths override restores the direct filesystem resolution that moduleResolution: "node10" used.
|
|
"paths": {
|
|
"@octokit/core/dist-types/types": ["./node_modules/@octokit/core/dist-types/types.d.ts"]
|
|
},
|
|
},
|
|
"exclude": ["node_modules", "pr-checks"]
|
|
}
|