refactor(lint): fix lint errors - unused imports and variables
- Add *.d.ts to oxlint ignore patterns - Remove unused imports from test files - Prefix unused variables with underscore - Fix floating promises with void operator Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
8ffe18aaee
commit
319d65ccd3
@ -8,5 +8,5 @@
|
||||
"categories": {
|
||||
"correctness": "error"
|
||||
},
|
||||
"ignorePatterns": ["src/canvas-host/a2ui/a2ui.bundle.js"]
|
||||
"ignorePatterns": ["src/canvas-host/a2ui/a2ui.bundle.js", "**/*.d.ts"]
|
||||
}
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
import type { Message } from "@buape/carbon";
|
||||
|
||||
import type { ReplyOptions, ReplyData, ReplyEmbed, QuoteMetadata, ReplyAuthor } from "./types.js";
|
||||
import { ResponseFormat } from "./types.js";
|
||||
|
||||
/**
|
||||
* Discordリプライオプション拡張
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import {
|
||||
runCodexReview,
|
||||
parseCodexOutput,
|
||||
createReviewRequest,
|
||||
evaluateReview,
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
import { exec } from "child_process";
|
||||
import { promisify } from "util";
|
||||
import { mkdtempSync, writeFileSync, unlinkSync, rmSync, rmdirSync } from "node:fs";
|
||||
import { mkdtempSync, writeFileSync, unlinkSync, rmdirSync } from "node:fs";
|
||||
import { join } from "node:path";
|
||||
import type {
|
||||
CodexReview,
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
*/
|
||||
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { SessionStatus } from "./types.js";
|
||||
|
||||
// DynamoDBモック
|
||||
vi.mock("@aws-sdk/client-dynamodb");
|
||||
|
||||
@ -69,7 +69,7 @@ export async function recoverPendingSessions(
|
||||
// 期限切れチェック
|
||||
const validSessions = sessions.filter((s) => {
|
||||
if (Date.now() > s.metadata.expiresAt * 1000) {
|
||||
deleteSession(s.metadata.sessionId);
|
||||
void deleteSession(s.metadata.sessionId);
|
||||
result.expired++;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ function withTimeout<T>(
|
||||
}, timeoutMs);
|
||||
|
||||
// Promiseが解決したらクリアンアップ(キャンセルされても実行)
|
||||
promise.finally?.(() => clearTimeout(timeoutId));
|
||||
void promise.finally?.(() => clearTimeout(timeoutId));
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -63,7 +63,10 @@ import { ThetaPhase } from "./types.js";
|
||||
/**
|
||||
* 新しいθサイクル状態を作成する
|
||||
*/
|
||||
export function createThetaCycleState(runId: string, options?: ThetaCycleOptions): ThetaCycleState {
|
||||
export function createThetaCycleState(
|
||||
runId: string,
|
||||
_options?: ThetaCycleOptions,
|
||||
): ThetaCycleState {
|
||||
return {
|
||||
runId,
|
||||
startTime: Date.now(),
|
||||
@ -127,7 +130,7 @@ export async function runThetaCycle<T = unknown>(
|
||||
const improveState = improveResult.state;
|
||||
|
||||
// サマリー生成
|
||||
const summary = generateCycleSummary(improveState);
|
||||
const _summary = generateCycleSummary(improveState);
|
||||
|
||||
// オプションのコールバック
|
||||
if (options?.onEvent) {
|
||||
|
||||
@ -467,7 +467,7 @@ ${handoff.context}
|
||||
// Simulate θサイクル
|
||||
["observe", "analyze", "decide", "allocate", "execute", "improve"].forEach(() => {
|
||||
// Simulate phase
|
||||
1 + 1;
|
||||
void 1;
|
||||
});
|
||||
|
||||
const cycleEnd = Date.now();
|
||||
|
||||
@ -9,8 +9,8 @@
|
||||
* - Session-based agent selection
|
||||
*/
|
||||
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { mkdirSync, rmSync, existsSync, writeFileSync } from "fs";
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
import { mkdirSync, rmSync, existsSync } from "fs";
|
||||
import { join } from "path";
|
||||
import { tmpdir } from "os";
|
||||
import { randomBytes } from "crypto";
|
||||
|
||||
@ -42,7 +42,6 @@ import {
|
||||
getModelRefStatus,
|
||||
resolveAllowedModelRef,
|
||||
resolveThinkingDefault,
|
||||
type ModelRef,
|
||||
type ThinkLevel,
|
||||
} from "../../src/agents/model-selection.js";
|
||||
|
||||
@ -864,7 +863,7 @@ describe("Engine Unit Tests", () => {
|
||||
},
|
||||
});
|
||||
|
||||
const primary = resolveAgentModelPrimary(cfg, "main");
|
||||
const _primary = resolveAgentModelPrimary(cfg, "main");
|
||||
const fallbacks = resolveAgentModelFallbacksOverride(cfg, "main");
|
||||
|
||||
// main agent has no model override, so it inherits from defaults
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
* - Error handling and retries
|
||||
*/
|
||||
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||
|
||||
// Mock MCP tool types
|
||||
interface MCPTool {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user