format all files with prettier

This commit is contained in:
Evan
2025-02-12 08:28:15 -08:00
parent a30079ac94
commit 40966ca3b9
51 changed files with 2492 additions and 2458 deletions
+4 -4
View File
@@ -134,7 +134,7 @@ wss.on("connection", (ws, req) => {
ws.on("message", (message: string) => {
try {
const clientMsg: ClientMessage = ClientMessageSchema.parse(
JSON.parse(message)
JSON.parse(message),
);
if (clientMsg.type == "join") {
const forwarded = req.headers["x-forwarded-for"];
@@ -147,7 +147,7 @@ wss.on("connection", (ws, req) => {
const { isValid, error } = validateUsername(clientMsg.username);
if (!isValid) {
console.log(
`game ${clientMsg.gameID}, client ${clientMsg.clientID} received invalid username, ${error}`
`game ${clientMsg.gameID}, client ${clientMsg.clientID} received invalid username, ${error}`,
);
return;
}
@@ -158,10 +158,10 @@ wss.on("connection", (ws, req) => {
clientMsg.persistentID,
ip,
clientMsg.username,
ws
ws,
),
clientMsg.gameID,
clientMsg.lastTurn
clientMsg.lastTurn,
);
}
if (clientMsg.type == "log") {