Enable the object-shorthand eslint rule (#1857)

## Description:

Enable the `object-shorthand` eslint rule.

## 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-18 19:51:55 -04:00
committed by GitHub
parent 6d0ae88e8c
commit ed090b88b5
21 changed files with 46 additions and 45 deletions
+12 -12
View File
@@ -48,9 +48,9 @@ export async function archive(gameRecord: GameRecord) {
const { message, stack, name } = error;
log.error(`${gameRecord.info.gameID}: Final archive error: ${error}`, {
message: message,
stack: stack,
name: name,
message,
stack,
name,
...(error && typeof error === "object" ? error : {}),
});
}
@@ -90,9 +90,9 @@ async function archiveAnalyticsToR2(gameRecord: GameRecord) {
const { message, stack, name } = error;
log.error(`${info.gameID}: Error writing game analytics to R2: ${error}`, {
message: message,
stack: stack,
name: name,
message,
stack,
name,
...(error && typeof error === "object" ? error : {}),
});
throw error;
@@ -147,9 +147,9 @@ export async function readGameRecord(
const { message, stack, name } = error;
// Log the error for monitoring purposes
log.error(`${gameId}: Error reading game record from R2: ${error}`, {
message: message,
stack: stack,
name: name,
message,
stack,
name,
...(error && typeof error === "object" ? error : {}),
});
@@ -178,9 +178,9 @@ export async function gameRecordExists(gameId: GameID): Promise<boolean> {
return false;
}
log.error(`${gameId}: Error checking archive existence: ${error}`, {
message: message,
stack: stack,
name: name,
message,
stack,
name,
...(error && typeof error === "object" ? error : {}),
});
return false;
+1 -1
View File
@@ -189,7 +189,7 @@ export class Cloudflare {
...Array.from(subdomainToService.entries()).map(
([subdomain, service]) => ({
hostname: `${subdomain}.${domain}`,
service: service,
service,
}),
),
{
+1 -1
View File
@@ -562,7 +562,7 @@ export class GameServer {
this.clientsDisconnectedStatus.set(clientID, isDisconnected);
this.addIntent({
clientID,
isDisconnected: isDisconnected,
isDisconnected,
type: "mark_disconnected",
});
}
+1 -1
View File
@@ -158,7 +158,7 @@ export class MapPlaylist {
continue;
}
nextEls.splice(i, 1);
playlist.push({ map: next, mode: mode });
playlist.push({ map: next, mode });
return true;
}
return false;
+2 -2
View File
@@ -266,7 +266,7 @@ export async function startWorker() {
return res.status(200).json({
exists: true,
gameRecord: gameRecord,
gameRecord,
success: true,
});
}),
@@ -340,7 +340,7 @@ export async function startWorker() {
if (process.send) {
process.send({
type: "WORKER_READY",
workerId: workerId,
workerId,
});
log.info("signaled ready state to master");
}
@@ -155,7 +155,7 @@ function handleWinner(
`Winner determined by ${potentialWinner.ips.size}/${activeUniqueIPs.size} active IPs`,
{
gameID: gs.id,
winnerKey: winnerKey,
winnerKey,
},
);
gs.archiveGame();