From cd2ef0f3a362f08007d05da5a7a0d92b57bed539 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 18 Apr 2026 18:09:18 +0100 Subject: [PATCH] chore(lint): enable low-noise rules --- .oxlintrc.json | 6 +++--- extensions/discord/src/monitor/native-command-ui.ts | 2 +- src/agents/pi-embedded-runner/run.ts | 2 +- src/gateway/call.test.ts | 2 +- src/gateway/server-methods/update.test.ts | 2 +- src/gateway/session-utils.test.ts | 5 +---- 6 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.oxlintrc.json b/.oxlintrc.json index 058c1067eaf..bd335386f6c 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -20,12 +20,12 @@ "typescript/consistent-return": "error", "typescript/no-explicit-any": "error", "typescript/no-extraneous-class": "error", - "typescript/no-meaningless-void-operator": "off", - "typescript/no-unnecessary-type-assertion": "off", + "typescript/no-meaningless-void-operator": "error", + "typescript/no-unnecessary-type-assertion": "error", "typescript/no-unnecessary-type-conversion": "error", "typescript/no-unnecessary-type-parameters": "off", "typescript/no-unsafe-type-assertion": "off", - "typescript/no-useless-default-assignment": "off", + "typescript/no-useless-default-assignment": "error", "unicorn/consistent-function-scoping": "off", "unicorn/prefer-set-size": "error", "unicorn/require-post-message-target-origin": "error" diff --git a/extensions/discord/src/monitor/native-command-ui.ts b/extensions/discord/src/monitor/native-command-ui.ts index 80de233aa59..0b5ae24af53 100644 --- a/extensions/discord/src/monitor/native-command-ui.ts +++ b/extensions/discord/src/monitor/native-command-ui.ts @@ -254,7 +254,7 @@ async function resolveDiscordModelPickerRouteState(params: { client: interaction.client, threadChannel: { id: rawChannelId, - name: "name" in channel ? (channel.name as string | undefined) : undefined, + name: "name" in channel ? channel.name : undefined, parentId: "parentId" in channel ? (channel.parentId ?? undefined) : undefined, parent: undefined, }, diff --git a/src/agents/pi-embedded-runner/run.ts b/src/agents/pi-embedded-runner/run.ts index ac17fea0302..d06932eac28 100644 --- a/src/agents/pi-embedded-runner/run.ts +++ b/src/agents/pi-embedded-runner/run.ts @@ -1733,7 +1733,7 @@ export async function runEmbeddedPiAgent( source: "planning_only_retry", }, }); - void params.onAgentEvent?.({ + params.onAgentEvent?.({ stream: "plan", data: { phase: "update", diff --git a/src/gateway/call.test.ts b/src/gateway/call.test.ts index b009e38613d..1ecb8576a1d 100644 --- a/src/gateway/call.test.ts +++ b/src/gateway/call.test.ts @@ -493,7 +493,7 @@ describe("callGateway url resolution", () => { }, start() { sawYieldBeforeStart = preConnectYieldRan; - void opts.onHelloOk?.({ + opts.onHelloOk?.({ features: { methods: helloMethods ?? [], events: [], diff --git a/src/gateway/server-methods/update.test.ts b/src/gateway/server-methods/update.test.ts index c3820016fa8..0ea25bbdaf2 100644 --- a/src/gateway/server-methods/update.test.ts +++ b/src/gateway/server-methods/update.test.ts @@ -96,7 +96,7 @@ beforeEach(() => { async function invokeUpdateRun( params: Record, - respond: ((ok: boolean, response?: unknown) => void) | undefined = undefined, + respond?: (ok: boolean, response?: unknown) => void, ) { const { updateHandlers } = await import("./update.js"); const onRespond = respond ?? (() => {}); diff --git a/src/gateway/session-utils.test.ts b/src/gateway/session-utils.test.ts index 023354f7d15..8a68652cbfd 100644 --- a/src/gateway/session-utils.test.ts +++ b/src/gateway/session-utils.test.ts @@ -731,10 +731,7 @@ describe("listSessionsFromStore selected model display", () => { }); describe("resolveSessionModelIdentityRef", () => { - const resolveLegacyIdentityRef = ( - cfg: OpenClawConfig, - modelProvider: string | undefined = undefined, - ) => + const resolveLegacyIdentityRef = (cfg: OpenClawConfig, modelProvider?: string) => resolveSessionModelIdentityRef(cfg, { sessionId: "legacy-session", updatedAt: Date.now(),