Fix various ESLint violations (#402)

## Description:

Fixes a number of ESLint violations. Although I have tested these
changes through the local dev server, I don't have a high confidence
that the testing is sufficient, as I am new to this codebase. This
change would benefit from heightened scrutiny.

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
- [x] I understand that submitting code with bugs that could have been
caught through manual testing blocks releases and new features for all
contributors

## Please put your Discord username so you can be contacted if a bug or
regression is found:

fake.neo

---------

Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com>
This commit is contained in:
Scott Anderson
2025-04-02 21:06:08 -04:00
committed by GitHub
parent 77a60d5a00
commit 52f64db6d3
21 changed files with 127 additions and 126 deletions
+5 -7
View File
@@ -25,7 +25,7 @@ import { loadTerrainMap } from "../core/game/TerrainMapLoader";
import { UserSettings } from "../core/game/UserSettings";
import { WorkerClient } from "../core/worker/WorkerClient";
import { InputHandler, MouseMoveEvent, MouseUpEvent } from "./InputHandler";
import { LocalPersistantStats } from "./LocalPersistantStats";
import { endGame, startGame, startTime } from "./LocalPersistantStats";
import { getPersistentIDFromCookie } from "./Main";
import {
SendAttackIntentEvent,
@@ -36,6 +36,7 @@ import {
import { createCanvas } from "./Utils";
import { createRenderer, GameRenderer } from "./graphics/GameRenderer";
export // Is this function needed?
function distSortUnitWorld(tile: TileRef, game: GameView) {
return (a: Unit | UnitView, b: Unit | UnitView) => {
return (
@@ -69,10 +70,7 @@ export function joinLobby(
);
const userSettings: UserSettings = new UserSettings();
LocalPersistantStats.startGame(
lobbyConfig.gameID,
lobbyConfig.gameStartInfo?.config,
);
startGame(lobbyConfig.gameID, lobbyConfig.gameStartInfo?.config);
const transport = new Transport(lobbyConfig, eventBus);
@@ -198,13 +196,13 @@ export class ClientGameRunner {
players,
// Not saving turns locally
[],
LocalPersistantStats.startTime(),
startTime(),
Date.now(),
winner,
update.winnerType,
update.allPlayersStats,
);
LocalPersistantStats.endGame(record);
endGame(record);
}
public start() {