From 55fe4b80959e836c94c83d297312aada435b956c Mon Sep 17 00:00:00 2001 From: Christopher Nelson Date: Tue, 22 Sep 2026 14:28:29 -0400 Subject: [PATCH] chore: remove unused imports and bindings flagged by lint Clear the ten remaining `@typescript-eslint/no-unused-vars` warnings, all left behind as dead code by the zero-swarm migration: unused h3-js and shared imports in the world engine and simulation service, unused test imports, an unused destructured `worker`, and a rest-omit binding in the shared snapshot fixture, which now builds roster entries from the fields it needs. No behavior changes; lint now reports no warnings. Co-Authored-By: Claude Opus 5.5 --- apps/game-api/src/simulation-service.ts | 4 +--- apps/game-api/src/swarm-directives.test.ts | 2 +- packages/shared/src/index.test.ts | 4 +--- packages/world-engine/src/index.ts | 11 +---------- 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/apps/game-api/src/simulation-service.ts b/apps/game-api/src/simulation-service.ts index d4c8b7c..770b72e 100644 --- a/apps/game-api/src/simulation-service.ts +++ b/apps/game-api/src/simulation-service.ts @@ -1,4 +1,4 @@ -import { gridDisk, gridDistance } from 'h3-js'; +import { gridDistance } from 'h3-js'; import { SwarmPlannerError, type ReflexProvider, @@ -11,9 +11,7 @@ import { experimentModelConfigurationSchema, modelSupportsReasoningProfile, updateExperimentModelsRequestSchema, - h3CellSchema, OPENROUTER_PROVIDER_TIMEOUT_MS, - WORLD_SCENARIO_LIMITS, PATIENT_ZERO_PLAYER_THREAT_FEED_LIMIT, PATIENT_ZERO_PRESSURE_WINDOW_TICKS, swarmDirectiveSchema, diff --git a/apps/game-api/src/swarm-directives.test.ts b/apps/game-api/src/swarm-directives.test.ts index d716f5b..6200125 100644 --- a/apps/game-api/src/swarm-directives.test.ts +++ b/apps/game-api/src/swarm-directives.test.ts @@ -93,7 +93,7 @@ describe('swarm directive semantics', () => { }); it('rejects infected expand targets while accepting open targets', () => { - const { state, worker, neighbor, directive } = fixture(); + const { state, neighbor, directive } = fixture(); const otherWorker = [...state.agents.values()][2]!; expect(swarmDirectiveIssue(state, directive('expand'))).toBeNull(); diff --git a/packages/shared/src/index.test.ts b/packages/shared/src/index.test.ts index 30d2f66..63b9df0 100644 --- a/packages/shared/src/index.test.ts +++ b/packages/shared/src/index.test.ts @@ -1,10 +1,8 @@ import { describe, expect, it } from 'vitest'; import { SWARM_PLANNER_CONTRACT_VERSION, - WORLD_SCENARIO_LIMITS, OBJECTIVE_PROMPT_VERSION, apiErrorSchema, - agentIdSchema, agentObservationSchema, captureEligibilitySchema, experimentExportWorldStateSchema, @@ -107,7 +105,7 @@ const snapshot = { spawnSeed: 'spawn', minimumSpawnSeparation: 0, patientZeroAgentId: worldAgents[0]!.id, - roster: worldAgents.map(({ currentCell: _currentCell, ...agent }) => agent), + roster: worldAgents.map(({ id, name, color }) => ({ id, name, color })), modelConfiguration: { globalModelId: 'author/compatible-model', globalReasoningProfile: 'provider-default', diff --git a/packages/world-engine/src/index.ts b/packages/world-engine/src/index.ts index 213afe5..28783a6 100644 --- a/packages/world-engine/src/index.ts +++ b/packages/world-engine/src/index.ts @@ -1,19 +1,10 @@ -import { - cellArea, - cellToLatLng, - greatCircleDistance, - gridDisk, - gridDistance, - latLngToCell, - UNITS, -} from 'h3-js'; +import { cellArea, gridDisk, gridDistance, latLngToCell, UNITS } from 'h3-js'; import { SWARM_PLANNER_CONTRACT_VERSION, DEVELOPMENT_WORLD_CONFIG, DEFAULT_MINIMUM_TICK_INTERVAL_MINUTES, DEFAULT_MAXIMUM_TICK_INTERVAL_MINUTES, DEFAULT_PROVIDER_ATTEMPT_LIMIT, - OBJECTIVE_PROMPT_VERSION, WORLD_SCENARIO_LIMITS, agentIdSchema, h3CellSchema,