Merge pull request #3076 from ApamNapat/turned_two_eslint_rules_on

Trailing whitespace and files not ending with \n are now illegal
This commit is contained in:
hydroflame 2022-03-10 22:12:17 -05:00 committed by GitHub
commit b7ffdeb5e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 16 additions and 16 deletions

@ -43,7 +43,7 @@ module.exports = {
curly: ["off"],
"default-case": ["off"],
"dot-notation": ["off"],
"eol-last": ["off"],
"eol-last": ["error"],
eqeqeq: ["off"],
"for-direction": ["error"],
"func-call-spacing": ["off"],
@ -236,7 +236,7 @@ module.exports = {
"no-ternary": ["off"],
"no-this-before-super": ["off"],
"no-throw-literal": ["error"],
"no-trailing-spaces": ["off"],
"no-trailing-spaces": ["error"],
"no-undef": ["off"],
"no-undef-init": ["error"],
"no-undefined": ["off"],

@ -26,7 +26,7 @@ async function initialize(win) {
} else {
log.log('Invalid authentication token');
res.writeHead(401);
res.end(JSON.stringify({
success: false,
msg: 'Invalid authentication token'
@ -71,7 +71,7 @@ async function initialize(win) {
result = await window.webContents.executeJavaScript(`document.saveFile("${data.filename}", "${data.code}")`);
break;
// Delete files
case "DELETE":
result = await window.webContents.executeJavaScript(`document.deleteFile("${data.filename}")`);

@ -16,4 +16,4 @@ for (const actionName of actionNames){
GeneralActions[actionName] = new Action({
name: actionName,
});
}
}

@ -74,7 +74,7 @@ for (var i = 0; i < multKeys.length; ++i) {
if (mult && mult !== 1) {
mult = formatNumber(mult, 3);
switch(multKeys[i]) {
}
}
}

@ -1286,7 +1286,7 @@ export class Industry implements IIndustry {
this.awareness = Math.min(awareness, Number.MAX_VALUE);
const popularity = (this.popularity + (1 * advMult)) * ((1 + getRandomInt(1, 3) / 100) * advMult);
this.popularity = Math.min(popularity, Number.MAX_VALUE);
this.popularity = Math.min(popularity, Number.MAX_VALUE);
break;
}
default: {

@ -559,7 +559,7 @@ export const FactionInfos: IMap<FactionInfo> = {
{" `..` "}<br /><br />
Many cultures predict an end to humanity in the near future, a final
Armageddon that will end the world; but we disagree.
<br /><br />Note that for this faction, reputation can
<br /><br />Note that for this faction, reputation can
only be gained by charging Stanek's gift.</>,
[],
false,

@ -905,9 +905,9 @@ export interface GangMemberInfo {
/** Name of the gang member */
name: string;
/** Currently assigned task */
task: string;
task: string;
earnedRespect: number;
/** Hack skill level */
hack: number;
/** Strength skill level */

@ -260,7 +260,7 @@ export async function loadThemes(monaco: { editor: any }): Promise<void> {
token: "ns",
foreground: "FFB86C",
fontStyle: "italic",
},
{
token: "netscriptfunction",

@ -36,7 +36,7 @@ export function ps(
}
terminal.print(res);
}
}
}
if(args.length === 0){
for (let i = 0; i < server.runningScripts.length; i++) {
const rsObj = server.runningScripts[i];

@ -356,12 +356,12 @@ export function TerminalInput({ terminal, router, player }: IProps): React.React
event.preventDefault();
modifyInput("deletewordbefore");
}
if (event.keyCode === KEY.D && event.altKey) {
event.preventDefault();
modifyInput("deletewordafter");
}
if (event.keyCode === KEY.U && event.ctrlKey) {
event.preventDefault();
modifyInput("clearbefore");

@ -288,4 +288,4 @@ function LogWindow(props: IProps): React.ReactElement {
</Paper>
</Draggable>
);
}
}

@ -75,4 +75,4 @@ export function subsetOf<Type, Key extends keyof Type, Value>(options: Value[]):
}
obj[key] = validValues as unknown as Type[Key];
};
}
}