Update tsconfig
Reorganize keys and make checks a bit more strict
This commit is contained in:
parent
5b04ca821c
commit
fb5aa6a25c
2 changed files with 31 additions and 21 deletions
|
|
@ -40,7 +40,8 @@ export const useReposStore = defineStore("repos", () => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function selectRepo(id: string) {
|
function selectRepo(id: string | undefined) {
|
||||||
|
if (id === undefined) return;
|
||||||
if (repos.value.get(id) === undefined) return;
|
if (repos.value.get(id) === undefined) return;
|
||||||
selectedRepoId.value = id;
|
selectedRepoId.value = id;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,37 @@
|
||||||
|
// Keys grouped according to
|
||||||
|
// https://www.typescriptlang.org/tsconfig/
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ES2020",
|
// Type Checking
|
||||||
"useDefineForClassFields": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"module": "ESNext",
|
"noImplicitOverride": true,
|
||||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
"noPropertyAccessFromIndexSignature": true,
|
||||||
"skipLibCheck": true,
|
"noUncheckedIndexedAccess": true,
|
||||||
|
|
||||||
/* Bundler mode */
|
|
||||||
"moduleResolution": "bundler",
|
|
||||||
"allowImportingTsExtensions": true,
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"isolatedModules": true,
|
|
||||||
"noEmit": true,
|
|
||||||
"jsx": "preserve",
|
|
||||||
|
|
||||||
/* Linting */
|
|
||||||
"strict": true,
|
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
"noFallthroughCasesInSwitch": true,
|
"strict": true,
|
||||||
|
|
||||||
"paths": {
|
// Modules
|
||||||
"@/*": ["./src/*"]
|
"allowImportingTsExtensions": true,
|
||||||
}
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"paths": { "@/*": ["./src/*"] },
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
|
||||||
|
// Emit
|
||||||
|
"noEmit": true,
|
||||||
|
|
||||||
|
// Interop Constraints
|
||||||
|
"isolatedModules": true,
|
||||||
|
|
||||||
|
// Language and Environment
|
||||||
|
"jsx": "preserve",
|
||||||
|
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||||
|
"target": "ES2020",
|
||||||
|
"useDefineForClassFields": true,
|
||||||
|
|
||||||
|
// Completeness
|
||||||
|
"skipLibCheck": true
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
||||||
"references": [{ "path": "./tsconfig.node.json" }]
|
"references": [{ "path": "./tsconfig.node.json" }]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue