Enable the @stylistic/ts/quotes eslint rule (#1850)

## Description:

Enable the `@stylistic/ts/quotes` eslint rule.

Fixes #1788

## Please complete the following:

- [x] I have added screenshots for all UI updates
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file
- [x] I have added relevant tests to the test directory
- [x] I confirm I have thoroughly tested these changes and take full
responsibility for any bugs introduced
This commit is contained in:
Scott Anderson
2025-08-17 21:00:16 -04:00
committed by GitHub
parent 0a40bcebf0
commit 1da46cfef2
24 changed files with 44 additions and 44 deletions
+4 -4
View File
@@ -127,7 +127,7 @@ export class GameServer {
public addClient(client: Client, lastTurn: number) {
this.websockets.add(client.ws);
if (this.kickedClients.has(client.clientID)) {
this.log.warn(`cannot add client, already kicked`, {
this.log.warn("cannot add client, already kicked", {
clientID: client.clientID,
});
return;
@@ -377,7 +377,7 @@ export class GameServer {
}
});
if (!this._hasPrestarted && !this._hasStarted) {
this.log.info(`game not started, not archiving game`);
this.log.info("game not started, not archiving game");
return;
}
this.log.info(`ending game with ${this.turns.length} turns`);
@@ -506,7 +506,7 @@ export class GameServer {
public kickClient(clientID: ClientID): void {
if (this.kickedClients.has(clientID)) {
this.log.warn(`cannot kick client, already kicked`, {
this.log.warn("cannot kick client, already kicked", {
clientID,
});
return;
@@ -529,7 +529,7 @@ export class GameServer {
);
this.kickedClients.add(clientID);
} else {
this.log.warn(`cannot kick client, not found in game`, {
this.log.warn("cannot kick client, not found in game", {
clientID,
});
}
+1 -1
View File
@@ -123,7 +123,7 @@ export async function startMaster() {
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment
const workerId = (worker as any).process?.env?.WORKER_ID;
if (!workerId) {
log.error(`worker crashed could not find id`);
log.error("worker crashed could not find id");
return;
}
+1 -1
View File
@@ -59,7 +59,7 @@ export class PrivilegeRefresher {
result.data,
base64url.decode,
);
this.log.info(`Privilege checker loaded successfully`);
this.log.info("Privilege checker loaded successfully");
} catch (error) {
this.log.error(`Failed to fetch cosmetics from ${this.endpoint}:`, error);
throw error;
+1 -1
View File
@@ -43,7 +43,7 @@ async function setupTunnels() {
const domainToService = new Map<string, string>().set(
config.subdomain(),
// TODO: change to 3000 when we have a proper tunnel setup.
`http://localhost:80`,
"http://localhost:80",
);
for (let i = 0; i < config.numWorkers(); i++) {
+5 -5
View File
@@ -30,7 +30,7 @@ const log = logger.child({ comp: `w_${workerId}` });
// Worker setup
export async function startWorker() {
log.info(`Worker starting...`);
log.info("Worker starting...");
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
@@ -98,7 +98,7 @@ export async function startWorker() {
})();
if (!id) {
log.warn(`cannot create game, id not found`);
log.warn("cannot create game, id not found");
return res.status(400).json({ error: "Game ID is required" });
}
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
@@ -342,7 +342,7 @@ export async function startWorker() {
type: "WORKER_READY",
workerId: workerId,
});
log.info(`signaled ready state to master`);
log.info("signaled ready state to master");
}
});
@@ -354,10 +354,10 @@ export async function startWorker() {
// Process-level error handlers
process.on("uncaughtException", (err) => {
log.error(`uncaught exception:`, err);
log.error("uncaught exception:", err);
});
process.on("unhandledRejection", (reason, promise) => {
log.error(`unhandled rejection at:`, promise, "reason:", reason);
log.error("unhandled rejection at:", promise, "reason:", reason);
});
}
@@ -42,7 +42,7 @@ export async function postJoinMessageHandler(
}
switch (clientMsg.intent.type) {
case "mark_disconnected": {
log.warn(`Should not receive mark_disconnected intent from client`);
log.warn("Should not receive mark_disconnected intent from client");
return;
}
@@ -52,7 +52,7 @@ export async function postJoinMessageHandler(
// Check if the authenticated client is the lobby creator
if (authenticatedClientID !== gs.lobbyCreatorID) {
log.warn(`Only lobby creator can kick players`, {
log.warn("Only lobby creator can kick players", {
clientID: authenticatedClientID,
creatorID: gs.lobbyCreatorID,
gameID: gs.id,
@@ -63,14 +63,14 @@ export async function postJoinMessageHandler(
// Don't allow lobby creator to kick themselves
if (authenticatedClientID === clientMsg.intent.target) {
log.warn(`Cannot kick yourself`, {
log.warn("Cannot kick yourself", {
clientID: authenticatedClientID,
});
return;
}
// Log and execute the kick
log.info(`Lobby creator initiated kick of player`, {
log.info("Lobby creator initiated kick of player", {
creatorID: authenticatedClientID,
gameID: gs.id,
kickMethod: "websocket",