mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-06 07:37:56 +02:00
CODEBASE: Expand lint rules, and Aliases are stored as maps (#501)
This commit is contained in:
@@ -8,12 +8,12 @@ import { Player } from "@player";
|
||||
import Button from "@mui/material/Button";
|
||||
import Tooltip from "@mui/material/Tooltip";
|
||||
|
||||
type IProps = {
|
||||
interface IProps {
|
||||
company: Company;
|
||||
entryPosType: CompanyPosition;
|
||||
onClick: (e: React.MouseEvent<HTMLElement>) => void;
|
||||
text: string;
|
||||
};
|
||||
}
|
||||
|
||||
/** React Component for a button that's used to apply for a job */
|
||||
export function ApplyToJobButton(props: IProps): React.ReactElement {
|
||||
|
||||
@@ -22,9 +22,9 @@ import { Theme } from "@mui/material/styles";
|
||||
import makeStyles from "@mui/styles/makeStyles";
|
||||
import createStyles from "@mui/styles/createStyles";
|
||||
|
||||
type IProps = {
|
||||
interface IProps {
|
||||
city: City;
|
||||
};
|
||||
}
|
||||
|
||||
const useStyles = makeStyles((theme: Theme) =>
|
||||
createStyles({
|
||||
@@ -70,9 +70,7 @@ function LocationLetter(location: Location, className: string): React.ReactEleme
|
||||
|
||||
function ASCIICity(props: IProps): React.ReactElement {
|
||||
const locationLettersRegex = /[A-Z]/g;
|
||||
const letterMap: {
|
||||
[key: string]: number;
|
||||
} = {
|
||||
const letterMap: Record<string, number> = {
|
||||
A: 0,
|
||||
B: 1,
|
||||
C: 2,
|
||||
|
||||
@@ -27,9 +27,9 @@ import { QuitJobModal } from "../../Company/ui/QuitJobModal";
|
||||
import { CompanyWork } from "../../Work/CompanyWork";
|
||||
import { useRerender } from "../../ui/React/hooks";
|
||||
|
||||
type IProps = {
|
||||
interface IProps {
|
||||
locName: LocationName;
|
||||
};
|
||||
}
|
||||
|
||||
export function CompanyLocation(props: IProps): React.ReactElement {
|
||||
const [quitOpen, setQuitOpen] = useState(false);
|
||||
|
||||
@@ -8,9 +8,9 @@ import { Player } from "@player";
|
||||
import { Money } from "../../ui/React/Money";
|
||||
import { MathJax } from "better-react-mathjax";
|
||||
|
||||
type IProps = {
|
||||
interface IProps {
|
||||
rerender: () => void;
|
||||
};
|
||||
}
|
||||
|
||||
export function CoresButton(props: IProps): React.ReactElement {
|
||||
const homeComputer = Player.getHomeComputer();
|
||||
|
||||
@@ -32,9 +32,9 @@ import { Page } from "../../ui/Router";
|
||||
import { serverMetadata } from "../../Server/data/servers";
|
||||
import { Tooltip } from "@mui/material";
|
||||
|
||||
type IProps = {
|
||||
interface IProps {
|
||||
loc: Location;
|
||||
};
|
||||
}
|
||||
|
||||
export function GenericLocation({ loc }: IProps): React.ReactElement {
|
||||
/**
|
||||
|
||||
@@ -18,9 +18,9 @@ import { ClassWork, Classes } from "../../Work/ClassWork";
|
||||
import { calculateCost } from "../../Work/Formulas";
|
||||
import { GymType } from "../../Enums";
|
||||
|
||||
type IProps = {
|
||||
interface IProps {
|
||||
loc: Location;
|
||||
};
|
||||
}
|
||||
|
||||
export function GymLocation(props: IProps): React.ReactElement {
|
||||
function train(stat: GymType): void {
|
||||
|
||||
@@ -13,9 +13,9 @@ import { formatRam } from "../../ui/formatNumber";
|
||||
import { MathJax } from "better-react-mathjax";
|
||||
import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers";
|
||||
|
||||
type IProps = {
|
||||
interface IProps {
|
||||
rerender: () => void;
|
||||
};
|
||||
}
|
||||
|
||||
export function RamButton(props: IProps): React.ReactElement {
|
||||
const homeComputer = Player.getHomeComputer();
|
||||
|
||||
@@ -38,9 +38,9 @@ import { ArcadeRoot } from "../../Arcade/ui/ArcadeRoot";
|
||||
import { FactionNames } from "../../Faction/data/FactionNames";
|
||||
import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers";
|
||||
|
||||
type IProps = {
|
||||
interface IProps {
|
||||
loc: Location;
|
||||
};
|
||||
}
|
||||
|
||||
export function SpecialLocation(props: IProps): React.ReactElement {
|
||||
const setRerender = useState(false)[1];
|
||||
|
||||
@@ -36,9 +36,9 @@ export function purchaseTorRouter(): void {
|
||||
);
|
||||
}
|
||||
|
||||
type IProps = {
|
||||
interface IProps {
|
||||
rerender: () => void;
|
||||
};
|
||||
}
|
||||
|
||||
export function TorButton(props: IProps): React.ReactElement {
|
||||
function buy(): void {
|
||||
|
||||
@@ -19,9 +19,9 @@ import { ClassWork, Classes } from "../../Work/ClassWork";
|
||||
import { calculateCost } from "../../Work/Formulas";
|
||||
import { UniversityClassType } from "../../Enums";
|
||||
|
||||
type IProps = {
|
||||
interface IProps {
|
||||
loc: Location;
|
||||
};
|
||||
}
|
||||
|
||||
export function UniversityLocation(props: IProps): React.ReactElement {
|
||||
function take(classType: UniversityClassType): void {
|
||||
|
||||
Reference in New Issue
Block a user