mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-03-11 04:42:34 +01:00
tidy up eslint.js
This commit is contained in:
24
.eslintrc.js
24
.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",
|
||||
},
|
||||
};
|
||||
|
@ -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]) => (
|
||||
<StatsRow
|
||||
key={uniqueId()}
|
||||
|
@ -138,6 +138,9 @@ export function NetscriptStanek(
|
||||
!player.queuedAugmentations.some((a) => 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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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();
|
||||
}}
|
||||
|
@ -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,
|
||||
};
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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",
|
||||
|
@ -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(
|
||||
<MenuItem key={i} value={i}>
|
||||
{i}
|
||||
|
Reference in New Issue
Block a user