chore: apply oxlint fix-suggestions (unused imports + useless fragments)

Scoped to only `no-unused-vars` and `react/jsx-no-useless-fragment` —
the safe subset of --fix-suggestions. Primary changes:

- Remove unused named imports from statements
- Remove unused default/type imports entirely
- Collapse `<><Single/></>` fragments to `<Single/>`

Verified clean: typecheck + format + lint all green.
This commit is contained in:
Mohamed Boudra
2026-04-23 21:55:25 +07:00
parent 731c570b25
commit cda3d1d46c
49 changed files with 70 additions and 207 deletions
@@ -3,7 +3,6 @@ import { DaemonClient, type DaemonTransport } from "./daemon-client";
import {
asUint8Array,
decodeTerminalResizePayload,
decodeTerminalSnapshotPayload,
decodeTerminalStreamFrame,
encodeTerminalSnapshotPayload,
encodeTerminalStreamFrame,
@@ -7,7 +7,7 @@
* to understand how command output is delivered.
*/
import { query, type SDKUserMessage, type SDKMessage } from "@anthropic-ai/claude-agent-sdk";
import { query, type SDKUserMessage } from "@anthropic-ai/claude-agent-sdk";
class Pushable<T> implements AsyncIterable<T> {
private queue: T[] = [];
+1 -6
View File
@@ -15,12 +15,7 @@
* Usage: npx tsx src/poc-commands/run-poc.ts
*/
import {
query,
type Query,
type SlashCommand,
type SDKUserMessage,
} from "@anthropic-ai/claude-agent-sdk";
import { query, type SlashCommand, type SDKUserMessage } from "@anthropic-ai/claude-agent-sdk";
// Pattern from claude-agent.ts listModels():
// Use an empty async generator when you just need control methods
@@ -107,7 +107,7 @@ async function startAgentMcpServer(logger: pino.Logger): Promise<AgentMcpServerH
}
await transport.handleRequest(req, res, req.body);
} catch (error) {
} catch {
if (!res.headersSent) {
res.status(500).json({
jsonrpc: "2.0",
@@ -1,6 +1,5 @@
import { describe, test, expect, beforeEach, afterEach } from "vitest";
import { createDaemonTestContext, type DaemonTestContext } from "../../test-utils/index.js";
import type { AgentSlashCommand } from "../agent-sdk-types.js";
// Fake-daemon plumbing coverage: validates manager/client command wiring without a real Claude binary.
describe("claude agent commands E2E", () => {
@@ -3281,7 +3281,7 @@ class ClaudeAgentSession implements AgentSession {
return;
}
this.ingestPersistedHistory(fs.readFileSync(historyPath, "utf8"));
} catch (error) {
} catch {
// ignore history load failures
}
}
@@ -17,7 +17,6 @@ import type {
AgentStreamEvent,
ToolCallTimelineItem,
AssistantMessageTimelineItem,
UserMessageTimelineItem,
AgentTimelineItem,
} from "../agent-sdk-types.js";
@@ -1,4 +1,4 @@
import { describe, test, expect, beforeAll, afterAll, beforeEach } from "vitest";
import { describe, test, expect, beforeAll, afterAll } from "vitest";
import { mkdtempSync, writeFileSync, rmSync, existsSync } from "node:fs";
import { readFile } from "node:fs/promises";
import { tmpdir, homedir } from "node:os";
@@ -13,7 +13,7 @@ import {
DaemonClient,
} from "./test-utils/index.js";
import { getFullAccessConfig, getAskModeConfig } from "./daemon-e2e/agent-configs.js";
import { chunkPcm16, parsePcm16MonoWav, wordSimilarity } from "./test-utils/dictation-e2e.js";
import { parsePcm16MonoWav, wordSimilarity } from "./test-utils/dictation-e2e.js";
import type {
AgentClient,
AgentPersistenceHandle,
@@ -1,19 +1,9 @@
import { describe, test, expect, beforeEach, afterEach } from "vitest";
import {
mkdtempSync,
writeFileSync,
existsSync,
rmSync,
mkdirSync,
readFileSync,
readdirSync,
} from "fs";
import { mkdtempSync, readdirSync } from "fs";
import { tmpdir } from "os";
import path from "path";
import { createDaemonTestContext, type DaemonTestContext } from "../test-utils/index.js";
import { createMessageCollector, type MessageCollector } from "../test-utils/message-collector.js";
import type { AgentTimelineItem } from "../agent/agent-sdk-types.js";
import type { AgentSnapshotPayload, SessionOutboundMessage } from "../messages.js";
function tmpCwd(): string {
return mkdtempSync(path.join(tmpdir(), "daemon-e2e-"));
@@ -1,17 +1,8 @@
import { describe, test, expect, beforeEach, afterEach } from "vitest";
import {
mkdtempSync,
writeFileSync,
existsSync,
rmSync,
mkdirSync,
readFileSync,
readdirSync,
} from "fs";
import { mkdtempSync, rmSync, readdirSync } from "fs";
import { tmpdir } from "os";
import path from "path";
import { createDaemonTestContext, type DaemonTestContext } from "../test-utils/index.js";
import type { AgentTimelineItem } from "../agent/agent-sdk-types.js";
import type { AgentSnapshotPayload, SessionOutboundMessage } from "../messages.js";
function tmpCwd(): string {
@@ -1,18 +1,8 @@
import { describe, test, expect, beforeEach, afterEach } from "vitest";
import {
mkdtempSync,
writeFileSync,
existsSync,
rmSync,
mkdirSync,
readFileSync,
readdirSync,
} from "fs";
import { mkdtempSync, writeFileSync, rmSync, readdirSync } from "fs";
import { tmpdir } from "os";
import path from "path";
import { createDaemonTestContext, type DaemonTestContext } from "../test-utils/index.js";
import type { AgentTimelineItem } from "../agent/agent-sdk-types.js";
import type { AgentSnapshotPayload, SessionOutboundMessage } from "../messages.js";
function tmpCwd(): string {
return mkdtempSync(path.join(tmpdir(), "daemon-e2e-"));
@@ -1,18 +1,8 @@
import { describe, test, expect, beforeEach, afterEach } from "vitest";
import {
mkdtempSync,
writeFileSync,
existsSync,
rmSync,
mkdirSync,
readFileSync,
readdirSync,
} from "fs";
import { mkdtempSync, writeFileSync, rmSync, mkdirSync, readdirSync } from "fs";
import { tmpdir } from "os";
import path from "path";
import { createDaemonTestContext, type DaemonTestContext } from "../test-utils/index.js";
import type { AgentTimelineItem } from "../agent/agent-sdk-types.js";
import type { AgentSnapshotPayload, SessionOutboundMessage } from "../messages.js";
function tmpCwd(): string {
return mkdtempSync(path.join(tmpdir(), "daemon-e2e-"));
@@ -1,14 +1,5 @@
import { describe, test, expect, beforeEach, afterEach } from "vitest";
import {
mkdtempSync,
writeFileSync,
existsSync,
rmSync,
mkdirSync,
readFileSync,
readdirSync,
realpathSync,
} from "fs";
import { mkdtempSync, writeFileSync, existsSync, rmSync, readFileSync, realpathSync } from "fs";
import { tmpdir } from "os";
import path from "path";
import { createDaemonTestContext, type DaemonTestContext } from "../test-utils/index.js";
@@ -16,7 +7,7 @@ import { createMessageCollector, type MessageCollector } from "../test-utils/mes
import { withTimeout } from "../../utils/promise-timeout.js";
import { deriveWorktreeProjectHash } from "../../utils/worktree.js";
import type { AgentTimelineItem } from "../agent/agent-sdk-types.js";
import type { AgentSnapshotPayload, SessionOutboundMessage } from "../messages.js";
import type { SessionOutboundMessage } from "../messages.js";
function tmpCwd(): string {
return mkdtempSync(path.join(tmpdir(), "daemon-e2e-"));
@@ -1,19 +1,9 @@
import { describe, test, expect, beforeEach, afterEach } from "vitest";
import {
mkdtempSync,
writeFileSync,
existsSync,
rmSync,
mkdirSync,
readFileSync,
readdirSync,
} from "fs";
import { mkdtempSync, rmSync, readdirSync } from "fs";
import { tmpdir } from "os";
import path from "path";
import { createDaemonTestContext, type DaemonTestContext } from "../test-utils/index.js";
import { createMessageCollector, type MessageCollector } from "../test-utils/message-collector.js";
import type { AgentTimelineItem } from "../agent/agent-sdk-types.js";
import type { AgentSnapshotPayload, SessionOutboundMessage } from "../messages.js";
function tmpCwd(): string {
return mkdtempSync(path.join(tmpdir(), "daemon-e2e-"));
@@ -1,18 +1,9 @@
import { describe, test, expect, beforeEach, afterEach } from "vitest";
import {
mkdtempSync,
writeFileSync,
existsSync,
rmSync,
mkdirSync,
readFileSync,
readdirSync,
} from "fs";
import { mkdtempSync, existsSync, rmSync, readFileSync } from "fs";
import { tmpdir } from "os";
import path from "path";
import { createDaemonTestContext, type DaemonTestContext } from "../test-utils/index.js";
import type { AgentTimelineItem } from "../agent/agent-sdk-types.js";
import type { AgentSnapshotPayload, SessionOutboundMessage } from "../messages.js";
import type { SessionOutboundMessage } from "../messages.js";
function tmpCwd(): string {
return mkdtempSync(path.join(tmpdir(), "daemon-e2e-"));
@@ -1,19 +1,11 @@
import { describe, test, expect, beforeEach, afterEach } from "vitest";
import {
mkdtempSync,
writeFileSync,
existsSync,
rmSync,
mkdirSync,
readFileSync,
readdirSync,
} from "fs";
import { mkdtempSync, writeFileSync, rmSync, readdirSync } from "fs";
import { tmpdir } from "os";
import path from "path";
import { createDaemonTestContext, type DaemonTestContext } from "../test-utils/index.js";
import { createMessageCollector } from "../test-utils/message-collector.js";
import type { AgentTimelineItem } from "../agent/agent-sdk-types.js";
import type { AgentSnapshotPayload, SessionOutboundMessage } from "../messages.js";
import type { SessionOutboundMessage } from "../messages.js";
function tmpCwd(): string {
return mkdtempSync(path.join(tmpdir(), "daemon-e2e-"));
@@ -1,11 +1,7 @@
import { describe, expect, test, vi } from "vitest";
import type { ManagedAgent } from "./agent/agent-manager.js";
import type { StoredAgentRecord } from "./agent/agent-storage.js";
import {
attachAgentStoragePersistence,
buildConfigOverrides,
buildSessionConfig,
} from "./persistence-hooks.js";
import { buildConfigOverrides, buildSessionConfig } from "./persistence-hooks.js";
import type {
AgentPermissionRequest,
AgentSession,
@@ -250,7 +250,7 @@ export class OpenAISTT implements SpeechToTextProvider {
if (tempFilePath) {
try {
await unlink(tempFilePath);
} catch (cleanupError) {
} catch {
logger.warn({ tempFilePath }, "Failed to clean up temp file");
}
}
@@ -13,7 +13,6 @@ import { afterEach, describe, expect, test, vi } from "vitest";
import pino, { type Logger } from "pino";
import type { SessionOutboundMessage, WorkspaceDescriptorPayload } from "./messages.js";
import { ScriptRouteStore } from "./script-proxy.js";
import { archivePaseoWorktree } from "./paseo-worktree-archive-service.js";
import {
buildAgentSessionConfig,
+2 -2
View File
@@ -1,12 +1,12 @@
#!/usr/bin/env node
import { Command } from "commander";
import { appendFileSync, existsSync, openSync, readFileSync } from "node:fs";
import { appendFileSync, existsSync, readFileSync } from "node:fs";
import { resolve } from "node:path";
import { FileTaskStore } from "./task-store.js";
import { computeExecutionOrder, buildSortedChildrenMap } from "./execution-order.js";
import { resolvePackageVersion } from "../server/package-version.js";
import { spawnProcess } from "../utils/spawn.js";
import type { AgentType, ModelName, Task } from "./types.js";
import type { AgentType, Task } from "./types.js";
const TASKS_DIR = resolve(process.cwd(), ".tasks");
const store = new FileTaskStore(TASKS_DIR);
@@ -1,6 +1,6 @@
import { describe, it, expect, afterEach, vi } from "vitest";
import { describe, it, expect, afterEach } from "vitest";
import { createTerminalManager, type TerminalManager } from "./terminal-manager.js";
import { existsSync, mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
import { existsSync, mkdtempSync, mkdirSync, readFileSync, rmSync } from "node:fs";
import { join } from "node:path";
import { tmpdir } from "node:os";
+1 -1
View File
@@ -710,7 +710,7 @@ function isGitError(error: unknown): boolean {
async function requireGitRepo(cwd: string): Promise<void> {
try {
await runGitCommand(["rev-parse", "--git-dir"], { cwd, env: READ_ONLY_GIT_ENV });
} catch (error) {
} catch {
throw new NotGitRepoError(cwd);
}
}