Skip to content

Commit

Permalink
Update TypeScript configs with stricter linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
junhaoliao committed Jan 12, 2025
1 parent c3b26e2 commit 0a3de9e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 23 deletions.
28 changes: 16 additions & 12 deletions components/log-viewer-webui/client/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"lib": [
"ES2022",
"DOM",
"DOM.Iterable"
],
"module": "ESNext",
"skipLibCheck": true,
"target": "ES2022",
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"useDefineForClassFields": true,

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"jsx": "react-jsx",
"moduleDetection": "force",
"moduleResolution": "bundler",
"noEmit": true,
"jsx": "react-jsx",

/* Linting */
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"alwaysStrict": true,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUncheckedSideEffectImports": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true,
"strictBindCallApply": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"useUnknownInCatchVariables": true
},
"include": ["src"]
"include": [
"src"
]
}
8 changes: 6 additions & 2 deletions components/log-viewer-webui/client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.node.json"
}
]
}
21 changes: 12 additions & 9 deletions components/log-viewer-webui/client/tsconfig.node.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2022",
"lib": ["ES2023"],
"lib": [
"ES2023"
],
"module": "ESNext",
"skipLibCheck": true,
"target": "ES2022",
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"isolatedModules": true,
"moduleDetection": "force",
"moduleResolution": "bundler",
"noEmit": true,

/* Linting */
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"alwaysStrict": true,
"exactOptionalPropertyTypes": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitOverride": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noPropertyAccessFromIndexSignature": true,
"noUncheckedIndexedAccess": true,
"noUncheckedSideEffectImports": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true,
"strictBindCallApply": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"useUnknownInCatchVariables": true
},
"include": ["vite.config.ts"]
"include": [
"vite.config.ts"
]
}

0 comments on commit 0a3de9e

Please sign in to comment.