diff --git a/gdn-app/src/stores/repos.ts b/gdn-app/src/stores/repos.ts index e4bb757..d2a3a04 100644 --- a/gdn-app/src/stores/repos.ts +++ b/gdn-app/src/stores/repos.ts @@ -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; selectedRepoId.value = id; } diff --git a/gdn-app/tsconfig.json b/gdn-app/tsconfig.json index 0c5a71e..d5f5a21 100644 --- a/gdn-app/tsconfig.json +++ b/gdn-app/tsconfig.json @@ -1,28 +1,37 @@ +// Keys grouped according to +// https://www.typescriptlang.org/tsconfig/ { "compilerOptions": { - "target": "ES2020", - "useDefineForClassFields": true, - "module": "ESNext", - "lib": ["ES2020", "DOM", "DOM.Iterable"], - "skipLibCheck": true, - - /* Bundler mode */ - "moduleResolution": "bundler", - "allowImportingTsExtensions": true, - "resolveJsonModule": true, - "isolatedModules": true, - "noEmit": true, - "jsx": "preserve", - - /* Linting */ - "strict": true, + // Type Checking + "noFallthroughCasesInSwitch": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noUncheckedIndexedAccess": true, "noUnusedLocals": true, "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true, + "strict": true, - "paths": { - "@/*": ["./src/*"] - } + // Modules + "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"], "references": [{ "path": "./tsconfig.node.json" }]