mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-02 18:38:08 +00:00
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:
+12
-12
@@ -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;
|
||||
|
||||
@@ -189,7 +189,7 @@ export class Cloudflare {
|
||||
...Array.from(subdomainToService.entries()).map(
|
||||
([subdomain, service]) => ({
|
||||
hostname: `${subdomain}.${domain}`,
|
||||
service: service,
|
||||
service,
|
||||
}),
|
||||
),
|
||||
{
|
||||
|
||||
@@ -562,7 +562,7 @@ export class GameServer {
|
||||
this.clientsDisconnectedStatus.set(clientID, isDisconnected);
|
||||
this.addIntent({
|
||||
clientID,
|
||||
isDisconnected: isDisconnected,
|
||||
isDisconnected,
|
||||
type: "mark_disconnected",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user