chore: remove the remaining unused local bindings

An ESLint no-unused-vars scan over src, server, scripts, tools, build
and pinokio, repeated until it is stable, reported these.

Runtime modules keep every call and drop only the unread binding:
- src/ui/cockpitInput.js: the unread result of enter()/exit().
- src/layers/launches/rendering.js: the unread entity returned by
  entities.add().
- src/layers/radio/rendering.js: the unread map key in the horizon scan,
  which now iterates the map's values.

QA scripts and tools drop an unused helper, two unused in-page module
imports, unused counters and destructured fields, and an unread wait
result. Tests drop source files read into variables that no assertion
uses, redundant StyleManager imports (the shell-source helper already
imports it), and unused destructured fields.

The one remaining report is the `_` loop variable in src/tools/schema.js,
which counts iterations and is intentional.
This commit is contained in:
Sameh Khamis committed 2026-10-22 19:08:10 -07:00
1 parent 46f7b74c8c
commit f3a87777ee
25 files changed
+15 -44

No files matched your search

@@ -60,7 +60,7 @@ test('the layer reports failure when a failed city left it with nothing', () =>
});
test('a layer with nothing to draw and nothing failed is not an error', () => {
const { state, methods } = makeLayer();
const { methods } = makeLayer();
// Out of range of every city is empty, not broken.
assert.equal(methods.getStats().error, undefined);
+1 -1
View File
@@ -109,7 +109,7 @@ export function createRendering({
);
});
if (satelliteTrack) layerState._orbitMatches++;
const entity = layerState._dataSource.entities.add({
layerState._dataSource.entities.add({
id: `rocket-launch:${launch.id}`,
position,
point: {
+1 -1
View File
@@ -259,7 +259,7 @@ export function createRendering({
layerState._horizonScanCount += 1;
const occluder = horizonOccluder(layerState._viewer.camera);
let visibilityChanged = false;
for (const [id, record] of layerState._renderById) {
for (const record of layerState._renderById.values()) {
const matches = parts.categories.stationMatchesRadioCategory(
record.station,
layerState._filter,
+2 -2
View File
@@ -317,7 +317,7 @@ test('a rejected key stops coverage requests until the layer goes off', async ()
test('a rate limit keeps the drawn tiles and asks again once the wait is over', async (t) => {
t.mock.timers.enable({ apis: ['setTimeout', 'Date'] });
const { viewer, source, state, coverage } = setup();
const { viewer, source, coverage } = setup();
coverage.refresh();
source.calls[0].reject(
Object.assign(new Error('rate limited'), { retryAfterSec: 30 }),
@@ -593,7 +593,7 @@ test('a tile that fails before the terrain table loads is reported at once, neve
});
test('the selected sequence is drawn and highlighted even past the per-tile cap', async () => {
const { state, source, coverage, centre, viewer } = setup();
const { state, source, coverage, centre } = setup();
const line = (n) => [
[
[centre.lon - 0.001, centre.lat + n * 1e-6],
-1
View File
@@ -1406,7 +1406,6 @@ test('the selected card lands where the vehicle stopped, not short of it', async
// segment ends left it a few metres behind, and then the render hold was
// released with no frame scheduled to close the gap.
const app = harness(t);
const start = Date.now();
app.serve('mbta', () => ({
status: 200,
body: snapshot('mbta', 'MBTA', [vehicle('b', 42.36, -71.06, reported())], {
+1 -1
View File
@@ -97,7 +97,7 @@ const complete = (model, extra = {}) => ({
});
test('local appearance and units reuse the loaded field; optional scalar requests remain separate', async () => {
const requests = [];
const { layer, calls } = harness({
const { layer } = harness({
getSnapshot: async (args) => {
requests.push(args);
return complete(