mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-12 17:28:31 +03:00
Fix linter errors
This commit is contained in:
Vendored
+2
@@ -81,6 +81,8 @@ const RemoveIDMiddleware: TMiddleware =
|
||||
return next(args, method);
|
||||
};
|
||||
|
||||
// a bug in monks types means that :any has to be used here. Maybe we'll make a PR for this?
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const StripIDMiddleware: TMiddleware = () => (next) => (args: any, method) => {
|
||||
if (method === "insert") {
|
||||
if (Array.isArray(args.data)) {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import t from "tap";
|
||||
import { CloseRedisPubSub, RedisPub, RedisSub } from "./redis-IPC";
|
||||
import { RedisPub, RedisSub } from "./redis-IPC";
|
||||
|
||||
t.test("Basic PUB/SUB testing", (t) => {
|
||||
t.setTimeout(2000);
|
||||
|
||||
@@ -4,7 +4,6 @@ import { IIDXDans } from "lib/constants/classes";
|
||||
import { ClassHandler } from "../../../framework/user-game-stats/types";
|
||||
import { ServerConfig } from "lib/setup/config";
|
||||
import { CreateURLWithParams } from "utils/url";
|
||||
import { profile } from "console";
|
||||
|
||||
export async function CreateArcIIDXClassHandler(
|
||||
profileID: string,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { KtLogger } from "lib/logger/logger";
|
||||
import { integer, KaiAuthDocument } from "tachi-common";
|
||||
import { integer } from "tachi-common";
|
||||
import { GetKaiAuthGuaranteed } from "utils/queries/auth";
|
||||
import { ParseKaiSDVX } from "../../common/api-kai/sdvx/parser";
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { KtLogger } from "lib/logger/logger";
|
||||
import { integer, KaiAuthDocument } from "tachi-common";
|
||||
import { integer } from "tachi-common";
|
||||
import { GetKaiAuthGuaranteed } from "utils/queries/auth";
|
||||
import { ParseKaiSDVX } from "../../common/api-kai/sdvx/parser";
|
||||
|
||||
|
||||
@@ -4,12 +4,9 @@ import { GetKTDataJSON, Testing511Song, Testing511SPA } from "test-utils/test-da
|
||||
import { ResolveChartFromSong, ResolveMatchTypeToKTData, ConverterBatchManual } from "./converter";
|
||||
import deepmerge from "deepmerge";
|
||||
import { EscapeStringRegexp } from "utils/misc";
|
||||
import { Game, ImportTypes } from "tachi-common";
|
||||
import { Game } from "tachi-common";
|
||||
import ResetDBState from "test-utils/resets";
|
||||
import {
|
||||
InvalidScoreFailure,
|
||||
KTDataNotFoundFailure,
|
||||
} from "../../../framework/common/converter-failures";
|
||||
import { InvalidScoreFailure } from "../../../framework/common/converter-failures";
|
||||
|
||||
import { BatchManualContext } from "./types";
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ t.test("#ParseIRUSC", (t) => {
|
||||
t.throws(() => ParseIRUSC({}, uscChart, logger), {
|
||||
statusCode: 400,
|
||||
message: /invalid usc score/iu,
|
||||
} as any);
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
||||
|
||||
@@ -16,6 +16,7 @@ t.test("#SearchGameSongs", (t) => {
|
||||
artist: "text",
|
||||
"alt-titles": "text",
|
||||
"search-titles": "text",
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
} as any /* known bug with monk */
|
||||
);
|
||||
});
|
||||
|
||||
@@ -30,5 +30,6 @@ export const RateLimitMiddleware = rateLimit({
|
||||
message: {
|
||||
success: false,
|
||||
description: `You have exceeded ${ServerConfig.RATE_LIMIT} requests per minute. Please wait.`,
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
} as any, // @todo #170 report this as a bug with rate-limit types.,
|
||||
});
|
||||
|
||||
@@ -10,14 +10,7 @@ import {
|
||||
MilestoneDocument,
|
||||
UserMilestoneDocument,
|
||||
} from "tachi-common";
|
||||
import {
|
||||
GetKTDataJSON,
|
||||
LoadTachiIIDXData,
|
||||
Testing511Song,
|
||||
Testing511SPA,
|
||||
TestingIIDXSPScore,
|
||||
TestingIIDXSPScorePB,
|
||||
} from "test-utils/test-data";
|
||||
import { Testing511SPA, TestingIIDXSPScore, TestingIIDXSPScorePB } from "test-utils/test-data";
|
||||
import deepmerge from "deepmerge";
|
||||
|
||||
t.test("GET /api/v1/users/:userID/games/:game/:playtype", (t) => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import crypto from "crypto";
|
||||
import { ServerConfig, ServerTypeInfo } from "lib/setup/config";
|
||||
import { ServerTypeInfo } from "lib/setup/config";
|
||||
import { Game, Playtypes, GetGameConfig } from "tachi-common";
|
||||
|
||||
// https://github.com/sindresorhus/escape-string-regexp/blob/main/index.js
|
||||
@@ -89,7 +89,7 @@ export function StripUrl(url: string, userInput: string | null) {
|
||||
return userInput;
|
||||
}
|
||||
|
||||
export function DeleteUndefinedProps(record: any) {
|
||||
export function DeleteUndefinedProps(record: Record<string, unknown>) {
|
||||
for (const key in record) {
|
||||
if (record[key] === undefined) {
|
||||
delete record[key];
|
||||
|
||||
Reference in New Issue
Block a user