mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 12:16:28 +00:00
Enable the @typescript-eslint/no-unsafe-member-access eslint rule (#1833)
## Description: Enable the `@typescript-eslint/no-unsafe-member-access` eslint rule. Fixes #1783 ## 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:
@@ -256,9 +256,11 @@ export class Cloudflare {
|
||||
);
|
||||
|
||||
cloudflared.stdout?.on("data", (data) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
log.info(data.toString().trim());
|
||||
});
|
||||
cloudflared.stderr?.on("data", (data) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
log.error(data.toString().trim());
|
||||
});
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ export class GameServer {
|
||||
);
|
||||
});
|
||||
client.ws.on("error", (error: Error) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
||||
if ((error as any).code === "WS_ERR_UNEXPECTED_RSV_1") {
|
||||
client.ws.close(1002, "WS_ERR_UNEXPECTED_RSV_1");
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@ async function getGatekeeper(): Promise<Gatekeeper> {
|
||||
"./gatekeeper/RealGatekeeper.js" as string
|
||||
).catch(() => import("./gatekeeper/RealGatekeeper.js" as string));
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
if (!module || !module.RealGatekeeper) {
|
||||
console.log(
|
||||
"RealGatekeeper class not found in module, using NoOpGatekeeper",
|
||||
@@ -79,6 +80,7 @@ async function getGatekeeper(): Promise<Gatekeeper> {
|
||||
}
|
||||
|
||||
console.log("Successfully loaded real gatekeeper");
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
||||
return new module.RealGatekeeper();
|
||||
} catch (error) {
|
||||
console.log("Failed to load real gatekeeper:", error);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
import cluster from "cluster";
|
||||
import express from "express";
|
||||
import rateLimit from "express-rate-limit";
|
||||
|
||||
@@ -309,7 +309,7 @@ export async function startWorker() {
|
||||
);
|
||||
|
||||
ws.on("error", (error: Error) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
|
||||
if ((error as any).code === "WS_ERR_UNEXPECTED_RSV_1") {
|
||||
ws.close(1002, "WS_ERR_UNEXPECTED_RSV_1");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user