CODEBASE: Expand lint rules, and Aliases are stored as maps (#501)

This commit is contained in:
Snarling
2023-05-05 03:55:59 -04:00
committed by GitHub
parent d25254caf1
commit ebae35b1fb
202 changed files with 905 additions and 1110 deletions
+2 -2
View File
@@ -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 {
+3 -5
View File
@@ -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,
+2 -2
View File
@@ -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);
+2 -2
View File
@@ -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();
+2 -2
View File
@@ -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 {
/**
+2 -2
View File
@@ -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 {
+2 -2
View File
@@ -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();
+2 -2
View File
@@ -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];
+2 -2
View File
@@ -36,9 +36,9 @@ export function purchaseTorRouter(): void {
);
}
type IProps = {
interface IProps {
rerender: () => void;
};
}
export function TorButton(props: IProps): React.ReactElement {
function buy(): void {
+2 -2
View File
@@ -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 {