mirror of
https://github.com/thepeacockproject/Peacock
synced 2024-11-22 22:12:45 +01:00
Fix linting issues
Signed-off-by: Reece Dunham <me@rdil.rocks>
This commit is contained in:
parent
16a0a0bf59
commit
799cf1a440
@ -258,6 +258,7 @@ export class HitsCategoryService {
|
||||
)
|
||||
break
|
||||
default:
|
||||
// eslint-disable-next-line no-extra-semi
|
||||
;(isPeacock ? contracts : nEscalations).push(id)
|
||||
}
|
||||
}
|
||||
|
@ -1196,7 +1196,6 @@ export class Controller {
|
||||
let theExports
|
||||
|
||||
try {
|
||||
// eslint-disable-next-line prefer-const
|
||||
theExports = new Script(pluginContents, {
|
||||
filename: pluginPath,
|
||||
}).runInContext(context)
|
||||
|
@ -172,10 +172,14 @@ export class RPCClient extends EventEmitter {
|
||||
pid = process.pid,
|
||||
): Promise<unknown> {
|
||||
let timestamps
|
||||
let assets
|
||||
let assets: {
|
||||
large_image: string
|
||||
large_text: string
|
||||
small_image: string
|
||||
small_text: string
|
||||
}
|
||||
|
||||
if (args.startTimestamp || args.endTimestamp) {
|
||||
// eslint-disable-next-line prefer-const
|
||||
timestamps = {
|
||||
start: args.startTimestamp,
|
||||
end: args.endTimestamp,
|
||||
@ -196,7 +200,6 @@ export class RPCClient extends EventEmitter {
|
||||
args.smallImageKey ||
|
||||
args.smallImageText
|
||||
) {
|
||||
// eslint-disable-next-line prefer-const
|
||||
assets = {
|
||||
large_image: args.largeImageKey,
|
||||
large_text: args.largeImageText,
|
||||
|
@ -352,8 +352,9 @@ export class LiveSplitClient extends EventEmitter {
|
||||
* @internal
|
||||
*/
|
||||
private async _waitForResponse(): LiveSplitResult {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/no-empty-function
|
||||
let listener: (...args: any[]) => void = () => {}
|
||||
let listener: (
|
||||
...args: (string | boolean | PromiseLike<string | boolean>)[]
|
||||
) => void = () => {}
|
||||
|
||||
const responseRecieved = new Promise<Awaited<LiveSplitResult>>(
|
||||
(resolve) => {
|
||||
|
@ -1106,6 +1106,7 @@ menuDataRouter.get(
|
||||
}
|
||||
|
||||
if (theMissions !== undefined) {
|
||||
// eslint-disable-next-line no-extra-semi
|
||||
;(theMissions as string[])
|
||||
.filter(
|
||||
// removes snow festival on h1
|
||||
|
@ -140,7 +140,7 @@ export async function planningView(
|
||||
const escalation = escalationTypes.includes(contractData.Metadata.Type)
|
||||
|
||||
// It is possible for req.query.contractid to be the id of a group OR a level in that group.
|
||||
let escalationGroupId =
|
||||
const escalationGroupId =
|
||||
contractData.Metadata.InGroup ?? contractData.Metadata.Id
|
||||
|
||||
if (escalation) {
|
||||
|
@ -190,21 +190,15 @@ async function downloadImagePack(): Promise<void> {
|
||||
|
||||
log(LogLevel.INFO, "Starting asset download...")
|
||||
|
||||
let resp, totalLength
|
||||
let resp, totalLength: number
|
||||
|
||||
try {
|
||||
const releaseInfo = await axios.get(
|
||||
`https://api.github.com/repos/${IMAGE_PACK_REPO}/releases/latest`,
|
||||
)
|
||||
|
||||
if (releaseInfo.status !== 200) {
|
||||
throw new Error("Failed to get release info!")
|
||||
}
|
||||
|
||||
// eslint-disable-next-line prefer-const
|
||||
totalLength = releaseInfo.data["assets"][0]["size"]
|
||||
|
||||
// eslint-disable-next-line prefer-const
|
||||
resp = await axios.get<Stream>(
|
||||
releaseInfo.data["assets"][0]["browser_download_url"],
|
||||
{
|
||||
|
@ -23,6 +23,7 @@ import { sign, verify } from "jsonwebtoken"
|
||||
import * as databaseHandler from "../../components/databaseHandler"
|
||||
import * as platformEntitlements from "../../components/platformEntitlements"
|
||||
import axios from "axios"
|
||||
import { describe, expect, beforeEach, vi, it } from "vitest"
|
||||
|
||||
import {
|
||||
getMockCallArgument,
|
||||
|
@ -19,6 +19,7 @@
|
||||
import { loadConfig } from "../mocks/configSwizzleManager"
|
||||
import { ContractSession, RatingKill } from "../../components/types/types"
|
||||
import { calculatePlaystyle } from "../../components/playStyles"
|
||||
import { describe, expect, test } from "vitest"
|
||||
|
||||
loadConfig("Playstyles")
|
||||
|
||||
|
@ -1,3 +1,23 @@
|
||||
/*
|
||||
* The Peacock Project - a HITMAN server replacement.
|
||||
* Copyright (C) 2021-2023 The Peacock Project Team
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { describe, it, expect } from "vitest"
|
||||
|
||||
describe("vitest", () => {
|
||||
/**
|
||||
* This test will verify if globals are configured correctly
|
||||
|
Loading…
Reference in New Issue
Block a user