Skip to content

Commit 44a1cd0

Browse files
committed
chore: add exhaustive switch check for eslint
1 parent 915de93 commit 44a1cd0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

.eslintrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"@typescript-eslint/ban-ts-comment": "off",
2626
"no-prototype-builtins": "off",
2727
"@typescript-eslint/no-empty-function": "off",
28-
"@typescript-eslint/consistent-type-imports": "warn"
28+
"@typescript-eslint/consistent-type-imports": "warn",
29+
"@typescript-eslint/switch-exhaustiveness-check": "error"
2930
},
3031
"ignorePatterns": ["node_modules/", "main.js"]
3132
}

src/ai/AIAssistant.ts

-3
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,6 @@ function getModelMaxTokens(model: Model) {
214214
return 16384;
215215
case "gpt-4-32k":
216216
return 32768;
217-
default:
218-
const exhaustiveCheck: never = model;
219-
throw new Error(`Unhandled model ${exhaustiveCheck}`);
220217
}
221218
}
222219

0 commit comments

Comments
 (0)