Skip to content

Commit f7d4665

Browse files
authored
fix: resolve oxlint warnings — suppress false positives, remove unused imports (anomalyco#22687)
1 parent bbdbc10 commit f7d4665

80 files changed

Lines changed: 82 additions & 106 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.oxlintrc.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
// Effect uses `function*` with Effect.gen/Effect.fnUntraced that don't always yield
55
"require-yield": "off",
66
// SolidJS uses `let ref: T | undefined` for JSX ref bindings assigned at runtime
7-
"no-unassigned-vars": "off"
7+
"no-unassigned-vars": "off",
8+
// SolidJS tracks reactive deps by reading properties inside createEffect
9+
"no-unused-expressions": "off",
10+
// Intentional control char matching (ANSI escapes, null byte sanitization)
11+
"no-control-regex": "off",
12+
// SST and plugin tools require triple-slash references
13+
"triple-slash-reference": "off"
814
},
915
"ignorePatterns": ["**/node_modules", "**/dist", "**/.build", "**/.sst", "**/*.d.ts"]
1016
}

github/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ async function assertOpencodeConnected() {
281281
})
282282
connected = true
283283
break
284-
} catch (e) {}
284+
} catch {}
285285
await sleep(300)
286286
} while (retry++ < 30)
287287

@@ -561,7 +561,7 @@ async function subscribeSessionEvents() {
561561
if (evt.properties.info.id !== session.id) continue
562562
session = evt.properties.info
563563
}
564-
} catch (e) {
564+
} catch {
565565
// Ignore parse errors
566566
}
567567
}
@@ -576,7 +576,7 @@ async function subscribeSessionEvents() {
576576
async function summarize(response: string) {
577577
try {
578578
return await chat(`Summarize the following in less than 40 characters:\n\n${response}`)
579-
} catch (e) {
579+
} catch {
580580
if (isScheduleEvent()) {
581581
return "Scheduled task changes"
582582
}

infra/enterprise.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { SECRET } from "./secret"
2-
import { domain, shortDomain } from "./stage"
2+
import { shortDomain } from "./stage"
33

44
const storage = new sst.cloudflare.Bucket("EnterpriseStorage")
55

packages/app/src/addons/serialize.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ class StringSerializeHandler extends BaseSerializeHandler {
258258
}
259259

260260
protected _beforeSerialize(rows: number, start: number, _end: number): void {
261-
this._allRows = new Array<string>(rows)
262-
this._allRowSeparators = new Array<string>(rows)
261+
this._allRows = Array.from<string>({ length: rows })
262+
this._allRowSeparators = Array.from<string>({ length: rows })
263263
this._rowIndex = 0
264264

265265
this._currentRow = ""

packages/app/src/components/session/session-header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { Spinner } from "@opencode-ai/ui/spinner"
88
import { showToast } from "@opencode-ai/ui/toast"
99
import { Tooltip, TooltipKeybind } from "@opencode-ai/ui/tooltip"
1010
import { getFilename } from "@opencode-ai/shared/util/path"
11-
import { createEffect, createMemo, For, onCleanup, Show } from "solid-js"
11+
import { createEffect, createMemo, For, Show } from "solid-js"
1212
import { createStore } from "solid-js/store"
1313
import { Portal } from "solid-js/web"
1414
import { useCommand } from "@/context/command"

packages/app/src/components/titlebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createEffect, createMemo, onCleanup, Show, untrack } from "solid-js"
1+
import { createEffect, createMemo, Show, untrack } from "solid-js"
22
import { createStore } from "solid-js/store"
33
import { useLocation, useNavigate, useParams } from "@solidjs/router"
44
import { IconButton } from "@opencode-ai/ui/icon-button"

packages/app/src/context/global-sync/queue.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export function createRefreshQueue(input: QueueInput) {
6363
}
6464
} finally {
6565
running = false
66+
// oxlint-disable-next-line no-unsafe-finally -- intentional: early return skips schedule() when paused
6667
if (input.paused()) return
6768
if (root || queued.size) schedule()
6869
}

packages/app/src/pages/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ export default function Layout(props: ParentProps) {
704704

705705
createEffect(() => {
706706
const active = new Set(visibleSessionDirs())
707-
for (const directory of [...prefetchedByDir.keys()]) {
707+
for (const directory of prefetchedByDir.keys()) {
708708
if (active.has(directory)) continue
709709
prefetchedByDir.delete(directory)
710710
}

packages/app/src/pages/session/review-tab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createEffect, createSignal, onCleanup, type JSX } from "solid-js"
1+
import { createEffect, onCleanup, type JSX } from "solid-js"
22
import { makeEventListener } from "@solid-primitives/event-listener"
33
import type { SnapshotFileDiff, VcsFileDiff } from "@opencode-ai/sdk/v2"
44
import { SessionReview } from "@opencode-ai/ui/session-review"

packages/console/app/src/component/email-signup.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { action, useSubmission } from "@solidjs/router"
2-
import dock from "../asset/lander/dock.png"
32
import { Resource } from "@opencode-ai/console-resource"
43
import { Show } from "solid-js"
54
import { useI18n } from "~/context/i18n"

0 commit comments

Comments
 (0)