mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-01 12:33:25 +00:00
Enable the @typescript-eslint/no-explicit-any eslint rule (#1830)
## Description: Enable the `@typescript-eslint/no-explicit-any` eslint rule. Fixes #1789 ## 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:
@@ -64,6 +64,7 @@ export class Cloudflare {
|
||||
private async makeRequest<T>(
|
||||
url: string,
|
||||
method = "GET",
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
data?: any,
|
||||
): Promise<T> {
|
||||
const response = await fetch(url, {
|
||||
|
||||
@@ -226,6 +226,7 @@ export class GameServer {
|
||||
);
|
||||
});
|
||||
client.ws.on("error", (error: Error) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
if ((error as any).code === "WS_ERR_UNEXPECTED_RSV_1") {
|
||||
client.ws.close(1002, "WS_ERR_UNEXPECTED_RSV_1");
|
||||
}
|
||||
|
||||
@@ -121,6 +121,7 @@ export async function startMaster() {
|
||||
|
||||
// Handle worker crashes
|
||||
cluster.on("exit", (worker, code, signal) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const workerId = (worker as any).process?.env?.WORKER_ID;
|
||||
if (!workerId) {
|
||||
log.error(`worker crashed could not find id`);
|
||||
|
||||
@@ -309,6 +309,7 @@ export async function startWorker() {
|
||||
);
|
||||
|
||||
ws.on("error", (error: Error) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
if ((error as any).code === "WS_ERR_UNEXPECTED_RSV_1") {
|
||||
ws.close(1002, "WS_ERR_UNEXPECTED_RSV_1");
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ export async function postJoinMessageHandler(
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
log.warn(`Unknown message type: ${(clientMsg as any).type}`, {
|
||||
log.warn(`Unknown message type: ${clientMsg.type}`, {
|
||||
clientID: client.clientID,
|
||||
});
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user