From 5157b9c445d480e7a3c39f29bdef3931668c2cf6 Mon Sep 17 00:00:00 2001 From: Qiaochu Hu <110hqc@gmail.com> Date: Wed, 11 Mar 2026 17:15:56 +0800 Subject: [PATCH] fix(services): resolve lint issues (#1261) * fix: resolve lint issues ## Summary Fix lint issues identified by the linter. ## Changes - **app.js**: Use `Number.isNaN()` instead of global `isNaN()` - **app.js**: Prefix unused variable `result` with underscore - **scheduler.ts**: Remove unused variable `log` ## Details - `Number.isNaN()` is the preferred way to check for NaN in modern JavaScript - Unused variables are flagged by the linter and should be removed or prefixed with underscore Co-Authored-By: Claude Opus 4.6 * Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: hobostay Co-authored-by: Claude Opus 4.6 Co-authored-by: Garfield Lee Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- services/minecraft/src/debug/web/app.js | 4 ++-- services/satori-bot/src/core/loop/scheduler.ts | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/services/minecraft/src/debug/web/app.js b/services/minecraft/src/debug/web/app.js index 48411b057..8d86c804b 100644 --- a/services/minecraft/src/debug/web/app.js +++ b/services/minecraft/src/debug/web/app.js @@ -1143,7 +1143,7 @@ class ToolsPanel { } value = Number.parseFloat(value) - if (isNaN(value)) { + if (Number.isNaN(value)) { this.showResult(tool.name, { error: `Invalid number for ${paramName}` }, true) return } @@ -1186,7 +1186,7 @@ class ToolsPanel { } handleResult(data) { - const { toolName, result, error } = data + const { toolName, error } = data this.executingTools.delete(toolName) this.updateCardState(toolName, error ? 'error' : 'success') diff --git a/services/satori-bot/src/core/loop/scheduler.ts b/services/satori-bot/src/core/loop/scheduler.ts index 499171572..8c329cd64 100644 --- a/services/satori-bot/src/core/loop/scheduler.ts +++ b/services/satori-bot/src/core/loop/scheduler.ts @@ -226,8 +226,6 @@ export async function onMessageArrival( } isQueueConsumerRunning = true - const log = botContext.logger - try { while (botContext.eventQueue.length > 0) { const currMsg = botContext.eventQueue[0]