Enable various eslint rules (#1773)

## Description:

Enable various eslint rules.

## 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-11 22:14:00 -04:00
committed by GitHub
parent 8a41919ed7
commit ce49599229
109 changed files with 471 additions and 460 deletions
+11 -11
View File
@@ -8,39 +8,39 @@ const log = logger.child({
module: "cloudflare",
});
export interface TunnelConfig {
export type TunnelConfig = {
domain: string;
subdomain: string;
subdomainToService: Map<string, string>;
}
};
interface TunnelResponse {
type TunnelResponse = {
result: {
id: string;
token: string;
};
}
};
interface ZoneResponse {
type ZoneResponse = {
result: Array<{
id: string;
}>;
}
};
interface DNSRecordResponse {
type DNSRecordResponse = {
result: Array<{
id: string;
}>;
}
};
interface CloudflaredConfig {
type CloudflaredConfig = {
tunnel: string;
"credentials-file": string;
ingress: Array<{
hostname?: string;
service: string;
}>;
}
};
const CloudflareTunnelConfigSchema = z.object({
a: z.string(),
@@ -63,7 +63,7 @@ export class Cloudflare {
private async makeRequest<T>(
url: string,
method: string = "GET",
method = "GET",
data?: any,
): Promise<T> {
const response = await fetch(url, {
+2 -2
View File
@@ -12,7 +12,7 @@ export enum LimiterType {
WebSocket = "websocket",
}
export interface Gatekeeper {
export type Gatekeeper = {
// The wrapper for request handlers with optional rate limiting
httpHandler: (
limiterType: LimiterType,
@@ -24,7 +24,7 @@ export interface Gatekeeper {
req: http.IncomingMessage | string,
fn: (message: string) => Promise<void>,
) => (message: string) => Promise<void>;
}
};
let gk: Gatekeeper | null = null;
+2 -2
View File
@@ -49,10 +49,10 @@ const frequency: Partial<Record<GameMapName, number>> = {
Yenisei: 1,
};
interface MapWithMode {
type MapWithMode = {
map: GameMapType;
mode: GameMode;
}
};
const TEAM_COUNTS = [
2,
+2 -2
View File
@@ -1,7 +1,7 @@
import { Cosmetics, Pattern } from "../core/CosmeticSchemas";
import { PatternDecoder } from "../core/PatternDecoder";
export interface PrivilegeChecker {
export type PrivilegeChecker = {
isPatternAllowed(
base64: string,
flares: readonly string[] | undefined,
@@ -10,7 +10,7 @@ export interface PrivilegeChecker {
flag: string,
flares: readonly string[] | undefined,
): true | "restricted" | "invalid";
}
};
export class PrivilegeCheckerImpl implements PrivilegeChecker {
private b64ToPattern: Record<string, Pattern> = {};