Resolve remaining eslint complaints
This commit is contained in:
parent
61a8c63944
commit
029ff27d5e
@ -22,6 +22,8 @@
|
||||
"@typescript-eslint/no-misused-promises": "off",
|
||||
"@typescript-eslint/no-unsafe-argument": "off",
|
||||
"@typescript-eslint/no-unsafe-call": "off",
|
||||
"@typescript-eslint/no-unsafe-assignment": "warn",
|
||||
"@typescript-eslint/no-explicit-any": "warn",
|
||||
"no-case-declarations": "off"
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { parseString } from "@/src/helpers/general";
|
||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||
import { upgradeMod } from "@/src/services/inventoryService";
|
||||
|
@ -8,7 +8,6 @@ import { IOid } from "@/src/types/commonTypes";
|
||||
import { getJSONfromString } from "@/src/helpers/stringHelpers";
|
||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||
import { getInventory } from "@/src/services/inventoryService";
|
||||
import { IInventoryDatabase } from "@/src/types/inventoryTypes/inventoryTypes";
|
||||
|
||||
export interface IClaimCompletedRecipeRequest {
|
||||
RecipeIds: IOid[];
|
||||
|
@ -23,7 +23,7 @@ export const getGuildDojoController: RequestHandler = async (req, res) => {
|
||||
CompletionTime: new Date(Date.now())
|
||||
}
|
||||
];
|
||||
guild.save();
|
||||
await guild.save();
|
||||
}
|
||||
|
||||
const dojo: IDojoClient = {
|
||||
|
@ -4,7 +4,6 @@ import allShipFeatures from "@/static/fixed_responses/allShipFeatures.json";
|
||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||
import { getPersonalRooms } from "@/src/services/personalRoomsService";
|
||||
import { getShip } from "@/src/services/shipService";
|
||||
import { PersonalRooms } from "@/src/models/personalRoomsModel";
|
||||
import { Loadout } from "@/src/models/inventoryModels/loadoutModel";
|
||||
import { logger } from "@/src/utils/logger";
|
||||
import { toOid } from "@/src/helpers/inventoryHelpers";
|
||||
|
@ -55,7 +55,7 @@ const inventoryController: RequestHandler = async (request: Request, response: R
|
||||
|
||||
if (config.unlockAllSkins) {
|
||||
inventoryResponse.WeaponSkins = [];
|
||||
for (let skin of allSkins) {
|
||||
for (const skin of allSkins) {
|
||||
inventoryResponse.WeaponSkins.push({
|
||||
ItemId: {
|
||||
$oid: "000000000000000000000000"
|
||||
|
@ -65,7 +65,7 @@ const loginController: RequestHandler = async (request, response) => {
|
||||
|
||||
if (account.Nonce == 0 || loginRequest.ClientType != "webui") {
|
||||
account.Nonce = nonce;
|
||||
account.save();
|
||||
await account.save();
|
||||
}
|
||||
|
||||
const { email, password, ...databaseAccount } = account.toJSON();
|
||||
|
@ -1,14 +1,13 @@
|
||||
import { RequestHandler } from "express";
|
||||
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||
import { Account } from "@/src/models/loginModel";
|
||||
import { IDatabaseAccountDocument } from "@/src/types/loginTypes";
|
||||
|
||||
const logoutController: RequestHandler = async (req, res) => {
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
const account = await Account.findOne({ _id: accountId });
|
||||
if (account) {
|
||||
account.Nonce = 0;
|
||||
account.save();
|
||||
await account.save();
|
||||
}
|
||||
res.writeHead(200, {
|
||||
"Content-Type": "text/html",
|
||||
|
@ -13,7 +13,7 @@ const updateChallengeProgressController: RequestHandler = async (req, res) => {
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
const inventory = await getInventory(accountId);
|
||||
addChallenges(inventory, payload.ChallengeProgress);
|
||||
inventory.save();
|
||||
await inventory.save();
|
||||
res.status(200).end();
|
||||
};
|
||||
|
||||
|
@ -15,7 +15,7 @@ export const upgradesController: RequestHandler = async (req, res) => {
|
||||
operation.UpgradeRequirement == "/Lotus/Types/Items/MiscItems/ModSlotUnlocker" ||
|
||||
operation.UpgradeRequirement == "/Lotus/Types/Items/MiscItems/CustomizationSlotUnlocker"
|
||||
) {
|
||||
updateCurrency(10, true, accountId);
|
||||
await updateCurrency(10, true, accountId);
|
||||
} else {
|
||||
addMiscItems(inventory, [
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ import allScans from "@/static/fixed_responses/allScans.json";
|
||||
|
||||
const viewController: RequestHandler = async (req, res) => {
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
const inventory = await Inventory.findOne({ accountOwnerId: req.query.accountId });
|
||||
const inventory = await Inventory.findOne({ accountOwnerId: accountId });
|
||||
if (!inventory) {
|
||||
res.status(400).json({ error: "inventory was undefined" });
|
||||
return;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { isString, parseString } from "@/src/helpers/general";
|
||||
import { isString } from "@/src/helpers/general";
|
||||
import { items } from "@/src/services/itemDataService";
|
||||
|
||||
export enum ItemType {
|
||||
|
@ -20,9 +20,7 @@ const httpsPort = config.httpsPort || 443;
|
||||
|
||||
// const server = http.createServer(app).listen(80);
|
||||
http.createServer(app).listen(httpPort, () => logger.info("HTTP server started on port " + httpPort));
|
||||
const server = https
|
||||
.createServer(options, app)
|
||||
.listen(httpsPort, () => logger.info("HTTPS server started on port " + httpsPort));
|
||||
https.createServer(options, app).listen(httpsPort, () => logger.info("HTTPS server started on port " + httpsPort));
|
||||
|
||||
// server.keepAliveTimeout = 60 * 1000 + 1000;
|
||||
// server.headersTimeout = 60 * 1000 + 2000;
|
||||
|
@ -25,6 +25,7 @@ function createNewSession(sessionData: ISession, Creator: string): ISession {
|
||||
customSettings: sessionData.customSettings || "",
|
||||
rewardSeed: sessionData.rewardSeed || -1,
|
||||
guildId: sessionData.guildId || "",
|
||||
// eslint-disable-next-line @typescript-eslint/no-loss-of-precision
|
||||
buildId: sessionData.buildId || 4920386201513015989,
|
||||
platform: sessionData.platform || 0,
|
||||
xplatform: sessionData.xplatform || true,
|
||||
|
@ -1,6 +1,7 @@
|
||||
// Hooks node to support require from "@/" paths for `npm run build && npm run start`.
|
||||
// Based on https://github.com/dividab/tsconfig-paths
|
||||
|
||||
/* eslint-disable */
|
||||
const Module = require("module");
|
||||
const originalResolveFilename = Module._resolveFilename;
|
||||
Module._resolveFilename = function (request: string, _parent: any): string {
|
||||
|
@ -80,5 +80,5 @@ export interface IUpgradeOperation {
|
||||
UpgradeRequirement: string; // uniqueName of item being consumed
|
||||
PolarizeSlot: number;
|
||||
PolarizeValue: FocusSchool;
|
||||
PolarityRemap: {}[];
|
||||
PolarityRemap: object[];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user