Skip to content

Commit 679bd08

Browse files
skulidropekclaude
andcommitted
fix(lint): remove eslint-disable and forbidden cast from unicorn fixes
- auto-agent-flags: replace ||=== chain with agentModes.find() so TypeScript narrows AgentMode without a type cast and no eslint-disable comment is needed - app-ready-terminal-storage: guard with value !== null before .includes() so the string|null parameter works without an `as string` cast Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c97670b commit 679bd08

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

packages/app/src/docker-git/frontend-lib/core/auto-agent-flags.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ export const resolveAutoAgentFlags = (
1414
if (requested === "auto") {
1515
return Either.right({ agentMode: undefined, agentAuto: true })
1616
}
17-
// eslint-disable-next-line unicorn/prefer-includes-over-repeated-comparisons
18-
if (requested === "claude" || requested === "codex" || requested === "gemini" || requested === "grok") {
19-
return Either.right({ agentMode: requested, agentAuto: true })
17+
const agentModes: readonly AgentMode[] = ["claude", "codex", "gemini", "grok"]
18+
const matchedMode = agentModes.find((mode) => mode === requested)
19+
if (matchedMode !== undefined) {
20+
return Either.right({ agentMode: matchedMode, agentAuto: true })
2021
}
2122
return Either.left({
2223
_tag: "InvalidOption",

packages/app/src/web/app-ready-terminal-storage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const readJsonArray = (value: JsonValue | undefined): ReadonlyArray<JsonValue> |
4343
const isStoredTerminalStatus = (
4444
value: string | null
4545
): value is ActiveTerminalSession["session"]["status"] =>
46-
["ready", "attached", "exited", "failed"].includes(value as string)
46+
value !== null && ["ready", "attached", "exited", "failed"].includes(value)
4747

4848
type StoredTerminalSessionFields = {
4949
readonly createdAt: string | null

0 commit comments

Comments
 (0)