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": {
|
"categories": {
|
||||||
"correctness": "error"
|
"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 { Message } from "@buape/carbon";
|
||||||
|
|
||||||
import type { ReplyOptions, ReplyData, ReplyEmbed, QuoteMetadata, ReplyAuthor } from "./types.js";
|
import type { ReplyOptions, ReplyData, ReplyEmbed, QuoteMetadata, ReplyAuthor } from "./types.js";
|
||||||
import { ResponseFormat } from "./types.js";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Discordリプライオプション拡張
|
* Discordリプライオプション拡張
|
||||||
|
|||||||
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import {
|
import {
|
||||||
runCodexReview,
|
|
||||||
parseCodexOutput,
|
parseCodexOutput,
|
||||||
createReviewRequest,
|
createReviewRequest,
|
||||||
evaluateReview,
|
evaluateReview,
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
import { exec } from "child_process";
|
import { exec } from "child_process";
|
||||||
import { promisify } from "util";
|
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 { join } from "node:path";
|
||||||
import type {
|
import type {
|
||||||
CodexReview,
|
CodexReview,
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import { SessionStatus } from "./types.js";
|
|
||||||
|
|
||||||
// DynamoDBモック
|
// DynamoDBモック
|
||||||
vi.mock("@aws-sdk/client-dynamodb");
|
vi.mock("@aws-sdk/client-dynamodb");
|
||||||
|
|||||||
@ -69,7 +69,7 @@ export async function recoverPendingSessions(
|
|||||||
// 期限切れチェック
|
// 期限切れチェック
|
||||||
const validSessions = sessions.filter((s) => {
|
const validSessions = sessions.filter((s) => {
|
||||||
if (Date.now() > s.metadata.expiresAt * 1000) {
|
if (Date.now() > s.metadata.expiresAt * 1000) {
|
||||||
deleteSession(s.metadata.sessionId);
|
void deleteSession(s.metadata.sessionId);
|
||||||
result.expired++;
|
result.expired++;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -204,7 +204,7 @@ function withTimeout<T>(
|
|||||||
}, timeoutMs);
|
}, timeoutMs);
|
||||||
|
|
||||||
// Promiseが解決したらクリアンアップ(キャンセルされても実行)
|
// 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 {
|
return {
|
||||||
runId,
|
runId,
|
||||||
startTime: Date.now(),
|
startTime: Date.now(),
|
||||||
@ -127,7 +130,7 @@ export async function runThetaCycle<T = unknown>(
|
|||||||
const improveState = improveResult.state;
|
const improveState = improveResult.state;
|
||||||
|
|
||||||
// サマリー生成
|
// サマリー生成
|
||||||
const summary = generateCycleSummary(improveState);
|
const _summary = generateCycleSummary(improveState);
|
||||||
|
|
||||||
// オプションのコールバック
|
// オプションのコールバック
|
||||||
if (options?.onEvent) {
|
if (options?.onEvent) {
|
||||||
|
|||||||
@ -467,7 +467,7 @@ ${handoff.context}
|
|||||||
// Simulate θサイクル
|
// Simulate θサイクル
|
||||||
["observe", "analyze", "decide", "allocate", "execute", "improve"].forEach(() => {
|
["observe", "analyze", "decide", "allocate", "execute", "improve"].forEach(() => {
|
||||||
// Simulate phase
|
// Simulate phase
|
||||||
1 + 1;
|
void 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
const cycleEnd = Date.now();
|
const cycleEnd = Date.now();
|
||||||
|
|||||||
@ -9,8 +9,8 @@
|
|||||||
* - Session-based agent selection
|
* - Session-based agent selection
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeEach, describe, expect, it } from "vitest";
|
||||||
import { mkdirSync, rmSync, existsSync, writeFileSync } from "fs";
|
import { mkdirSync, rmSync, existsSync } from "fs";
|
||||||
import { join } from "path";
|
import { join } from "path";
|
||||||
import { tmpdir } from "os";
|
import { tmpdir } from "os";
|
||||||
import { randomBytes } from "crypto";
|
import { randomBytes } from "crypto";
|
||||||
|
|||||||
@ -42,7 +42,6 @@ import {
|
|||||||
getModelRefStatus,
|
getModelRefStatus,
|
||||||
resolveAllowedModelRef,
|
resolveAllowedModelRef,
|
||||||
resolveThinkingDefault,
|
resolveThinkingDefault,
|
||||||
type ModelRef,
|
|
||||||
type ThinkLevel,
|
type ThinkLevel,
|
||||||
} from "../../src/agents/model-selection.js";
|
} 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");
|
const fallbacks = resolveAgentModelFallbacksOverride(cfg, "main");
|
||||||
|
|
||||||
// main agent has no model override, so it inherits from defaults
|
// main agent has no model override, so it inherits from defaults
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
* - Error handling and retries
|
* - 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
|
// Mock MCP tool types
|
||||||
interface MCPTool {
|
interface MCPTool {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user