mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-09 06:53:32 +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:
@@ -1,6 +1,7 @@
|
||||
export type GameEvent = object;
|
||||
|
||||
export type EventConstructor<T extends GameEvent = GameEvent> = new (
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
...args: any[]
|
||||
) => T;
|
||||
|
||||
|
||||
@@ -285,6 +285,7 @@ export const flattenedEmojiTable: string[] = emojiTable.flat();
|
||||
/**
|
||||
* JSON.stringify replacer function that converts bigint values to strings.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export function replacer(_key: string, value: any): any {
|
||||
return typeof value === "bigint" ? value.toString() : value;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
WorkerMessage,
|
||||
} from "./WorkerMessages";
|
||||
|
||||
const ctx: Worker = self as any;
|
||||
const ctx: Worker = self as unknown as Worker;
|
||||
let gameRunner: Promise<GameRunner> | null = null;
|
||||
const mapLoader = new FetchGameMapLoader(`/maps`, version);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user