Enable the Enable max-len and max-lines eslint rules (#1842)

## Description:

Enable the Enable `max-len` and `max-lines` eslint rules.

Fixes #1785

## 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 04:31:15 -04:00
committed by GitHub
parent e9f29be93c
commit 0befdcd90a
37 changed files with 191 additions and 71 deletions
+1
View File
@@ -154,6 +154,7 @@ export const TeamSchema = z.string();
const SafeString = z
.string()
.regex(
// eslint-disable-next-line max-len
/^([a-zA-Z0-9\s.,!?@#$%&*()\-_+=[\]{}|;:"'/\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]|[üÜ])*$/u,
)
.max(1000);
+1
View File
@@ -1,3 +1,4 @@
/* eslint-disable max-lines */
import { JWK } from "jose";
import { z } from "zod";
import {
+1
View File
@@ -1,3 +1,4 @@
/* eslint-disable max-lines */
import { renderNumber } from "../../client/Utils";
import { Config } from "../configuration/Config";
import { AllPlayersStats, ClientID, Winner } from "../Schemas";
+1
View File
@@ -1,3 +1,4 @@
/* eslint-disable max-lines */
import { renderNumber, renderTroops } from "../../client/Utils";
import { PseudoRandom } from "../PseudoRandom";
import { ClientID } from "../Schemas";
+2 -1
View File
@@ -66,7 +66,8 @@ export async function genTerrainFromBin(
): Promise<GameMap> {
if (data.length !== mapData.width * mapData.height) {
throw new Error(
`Invalid data: buffer size ${data.length} incorrect for ${mapData.width}x${mapData.height} terrain plus 4 bytes for dimensions.`,
`Invalid data: buffer size ${data.length} incorrect for ${mapData.width}x${mapData.height
} terrain plus 4 bytes for dimensions.`,
);
}