diff --git a/.eslintrc.js b/.eslintrc.js index ec276b582..2b9ca6faa 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,7 +7,7 @@ module.exports = { extends: [ "eslint:recommended", "plugin:@typescript-eslint/recommended", - // "plugin:@typescript-eslint/recommended-requiring-type-checking", + "plugin:@typescript-eslint/recommended-requiring-type-checking", ], parser: "@typescript-eslint/parser", parserOptions: { @@ -21,29 +21,7 @@ module.exports = { plugins: ["@typescript-eslint"], extends: ["plugin:@typescript-eslint/recommended"], rules: { - "@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_" }], "@typescript-eslint/ban-ts-comment": "off", - "@typescript-eslint/explicit-function-return-type": [ - "error", - { - allowExpressions: true, - }, - ], - // "no-constant-condition": [ - // "error", - // { - // checkLoops: false, - // }, - // ], - "no-empty": [ - "off", - { - allowEmptyCatch: false, - }, - ], - "no-inner-declarations": ["off", "both"], - "no-prototype-builtins": ["off"], - "no-useless-escape": ["off"], "@typescript-eslint/no-explicit-any": "off", }, }; diff --git a/src/BitNode/ui/BitnodeMultipliersDescription.tsx b/src/BitNode/ui/BitnodeMultipliersDescription.tsx index 22e75b3b2..1acd70f4d 100644 --- a/src/BitNode/ui/BitnodeMultipliersDescription.tsx +++ b/src/BitNode/ui/BitnodeMultipliersDescription.tsx @@ -77,7 +77,7 @@ interface IBNMultTableProps { const BNMultTable = (props: IBNMultTableProps): React.ReactElement => { const rowsArray = Object.entries(props.rowData) - .filter(([key, _value]) => props.mults[key] !== defaultMultipliers[key]) + .filter(([key]) => props.mults[key] !== defaultMultipliers[key]) .map(([key, value]) => ( a.name === AugmentationNames.StaneksGift1) ) { applyAugmentation({ name: AugmentationNames.StaneksGift1, level: 1 }); + _ctx.log( + () => `'${FactionNames.ChurchOfTheMachineGod}' joined and '${AugmentationNames.StaneksGift1}' installed.`, + ); } } //Return true iff the player is in CotMG and has the first Stanek aug installed diff --git a/src/PersonObjects/Player/PlayerObjectGeneralMethods.ts b/src/PersonObjects/Player/PlayerObjectGeneralMethods.ts index a07363de2..ee1c96235 100644 --- a/src/PersonObjects/Player/PlayerObjectGeneralMethods.ts +++ b/src/PersonObjects/Player/PlayerObjectGeneralMethods.ts @@ -575,7 +575,7 @@ export function getNextCompanyPosition( return entryPosType; } -export function quitJob(this: IPlayer, company: string, _sing = false): void { +export function quitJob(this: IPlayer, company: string): void { if (isCompanyWork(this.currentWork) && this.currentWork.companyName === company) { this.finishWork(true); } diff --git a/src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx b/src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx index ab512125b..582ba3df5 100644 --- a/src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx +++ b/src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx @@ -54,7 +54,7 @@ export function SleeveAugmentationsModal(props: IProps): React.ReactElement { canPurchase={(player, aug) => { return player.money > aug.baseCost; }} - purchaseAugmentation={(player, aug, _showModal) => { + purchaseAugmentation={(player, aug) => { props.sleeve.tryBuyAugmentation(player, aug); rerender(); }} diff --git a/src/PersonObjects/Sleeve/ui/TaskSelector.tsx b/src/PersonObjects/Sleeve/ui/TaskSelector.tsx index f6e100b1a..53f04d8ba 100644 --- a/src/PersonObjects/Sleeve/ui/TaskSelector.tsx +++ b/src/PersonObjects/Sleeve/ui/TaskSelector.tsx @@ -240,7 +240,7 @@ const canDo: { [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city), "Workout at Gym": (player: IPlayer, sleeve: Sleeve) => [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city), - "Perform Bladeburner Actions": (player: IPlayer, _: Sleeve) => player.inBladeburner(), + "Perform Bladeburner Actions": (player: IPlayer) => player.inBladeburner(), "Shock Recovery": (player: IPlayer, sleeve: Sleeve) => sleeve.shock < 100, Synchronize: (player: IPlayer, sleeve: Sleeve) => sleeve.sync < 100, }; diff --git a/src/data/codingcontracttypes.ts b/src/data/codingcontracttypes.ts index 5caacf345..bcc8f52cc 100644 --- a/src/data/codingcontracttypes.ts +++ b/src/data/codingcontracttypes.ts @@ -1424,8 +1424,8 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [ if (ans == "[]") { //Helper function to get neighbourhood of a vertex function neighbourhood(vertex: number): number[] { - const adjLeft = data[1].filter(([a, _]) => a == vertex).map(([_, b]) => b); - const adjRight = data[1].filter(([_, b]) => b == vertex).map(([a, _]) => a); + const adjLeft = data[1].filter(([a]) => a == vertex).map(([, b]) => b); + const adjRight = data[1].filter(([, b]) => b == vertex).map(([a]) => a); return adjLeft.concat(adjRight); } diff --git a/src/ui/React/LogBoxManager.tsx b/src/ui/React/LogBoxManager.tsx index b08c5fc56..c28548751 100644 --- a/src/ui/React/LogBoxManager.tsx +++ b/src/ui/React/LogBoxManager.tsx @@ -14,7 +14,6 @@ import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos"; import { workerScripts } from "../../Netscript/WorkerScripts"; import { startWorkerScript } from "../../NetscriptWorker"; import { GetServer } from "../../Server/AllServers"; -import { Theme } from "@mui/material"; import { findRunningScript } from "../../Script/ScriptHelpers"; import { Player } from "../../Player"; import { debounce } from "lodash"; @@ -97,7 +96,7 @@ interface IProps { onClose: () => void; } -const useStyles = makeStyles((_theme: Theme) => +const useStyles = makeStyles(() => createStyles({ logs: { overflowY: "scroll", diff --git a/src/ui/React/PromptManager.tsx b/src/ui/React/PromptManager.tsx index 9d8d89565..de16b38a4 100644 --- a/src/ui/React/PromptManager.tsx +++ b/src/ui/React/PromptManager.tsx @@ -128,9 +128,8 @@ function PromptMenuSelect({ prompt, resolve }: IContentProps): React.ReactElemen }; const getItems = (choices: string[]): React.ReactElement[] => { - const content = []; + const content: React.ReactElement[] = []; for (const i of choices) { - // @ts-ignore content.push( {i}