mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 07:33:48 +01:00
Trailing whitespace and files not ending with \n are now illegal
This commit is contained in:
parent
570b8caf78
commit
2f4d879c16
@ -43,7 +43,7 @@ module.exports = {
|
|||||||
curly: ["off"],
|
curly: ["off"],
|
||||||
"default-case": ["off"],
|
"default-case": ["off"],
|
||||||
"dot-notation": ["off"],
|
"dot-notation": ["off"],
|
||||||
"eol-last": ["off"],
|
"eol-last": ["error"],
|
||||||
eqeqeq: ["off"],
|
eqeqeq: ["off"],
|
||||||
"for-direction": ["error"],
|
"for-direction": ["error"],
|
||||||
"func-call-spacing": ["off"],
|
"func-call-spacing": ["off"],
|
||||||
@ -236,7 +236,7 @@ module.exports = {
|
|||||||
"no-ternary": ["off"],
|
"no-ternary": ["off"],
|
||||||
"no-this-before-super": ["off"],
|
"no-this-before-super": ["off"],
|
||||||
"no-throw-literal": ["error"],
|
"no-throw-literal": ["error"],
|
||||||
"no-trailing-spaces": ["off"],
|
"no-trailing-spaces": ["error"],
|
||||||
"no-undef": ["off"],
|
"no-undef": ["off"],
|
||||||
"no-undef-init": ["error"],
|
"no-undef-init": ["error"],
|
||||||
"no-undefined": ["off"],
|
"no-undefined": ["off"],
|
||||||
|
@ -26,7 +26,7 @@ async function initialize(win) {
|
|||||||
} else {
|
} else {
|
||||||
log.log('Invalid authentication token');
|
log.log('Invalid authentication token');
|
||||||
res.writeHead(401);
|
res.writeHead(401);
|
||||||
|
|
||||||
res.end(JSON.stringify({
|
res.end(JSON.stringify({
|
||||||
success: false,
|
success: false,
|
||||||
msg: 'Invalid authentication token'
|
msg: 'Invalid authentication token'
|
||||||
@ -71,7 +71,7 @@ async function initialize(win) {
|
|||||||
|
|
||||||
result = await window.webContents.executeJavaScript(`document.saveFile("${data.filename}", "${data.code}")`);
|
result = await window.webContents.executeJavaScript(`document.saveFile("${data.filename}", "${data.code}")`);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Delete files
|
// Delete files
|
||||||
case "DELETE":
|
case "DELETE":
|
||||||
result = await window.webContents.executeJavaScript(`document.deleteFile("${data.filename}")`);
|
result = await window.webContents.executeJavaScript(`document.deleteFile("${data.filename}")`);
|
||||||
|
@ -16,4 +16,4 @@ for (const actionName of actionNames){
|
|||||||
GeneralActions[actionName] = new Action({
|
GeneralActions[actionName] = new Action({
|
||||||
name: actionName,
|
name: actionName,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ for (var i = 0; i < multKeys.length; ++i) {
|
|||||||
if (mult && mult !== 1) {
|
if (mult && mult !== 1) {
|
||||||
mult = formatNumber(mult, 3);
|
mult = formatNumber(mult, 3);
|
||||||
switch(multKeys[i]) {
|
switch(multKeys[i]) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1286,7 +1286,7 @@ export class Industry implements IIndustry {
|
|||||||
this.awareness = Math.min(awareness, Number.MAX_VALUE);
|
this.awareness = Math.min(awareness, Number.MAX_VALUE);
|
||||||
|
|
||||||
const popularity = (this.popularity + (1 * advMult)) * ((1 + getRandomInt(1, 3) / 100) * advMult);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
@ -559,7 +559,7 @@ export const FactionInfos: IMap<FactionInfo> = {
|
|||||||
{" `..` "}<br /><br />
|
{" `..` "}<br /><br />
|
||||||
Many cultures predict an end to humanity in the near future, a final
|
Many cultures predict an end to humanity in the near future, a final
|
||||||
Armageddon that will end the world; but we disagree.
|
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.</>,
|
only be gained by charging Stanek's gift.</>,
|
||||||
[],
|
[],
|
||||||
false,
|
false,
|
||||||
|
@ -1655,7 +1655,7 @@ export function NetscriptFunctions(workerScript: WorkerScript): NS {
|
|||||||
}else{
|
}else{
|
||||||
workerScript.log("purchaseServer", () => `Invalid argument: ram='${ram}' must be a positive power of 2`);
|
workerScript.log("purchaseServer", () => `Invalid argument: ram='${ram}' must be a positive power of 2`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
4
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -905,9 +905,9 @@ export interface GangMemberInfo {
|
|||||||
/** Name of the gang member */
|
/** Name of the gang member */
|
||||||
name: string;
|
name: string;
|
||||||
/** Currently assigned task */
|
/** Currently assigned task */
|
||||||
task: string;
|
task: string;
|
||||||
earnedRespect: number;
|
earnedRespect: number;
|
||||||
|
|
||||||
/** Hack skill level */
|
/** Hack skill level */
|
||||||
hack: number;
|
hack: number;
|
||||||
/** Strength skill level */
|
/** Strength skill level */
|
||||||
|
@ -260,7 +260,7 @@ export async function loadThemes(monaco: { editor: any }): Promise<void> {
|
|||||||
token: "ns",
|
token: "ns",
|
||||||
foreground: "FFB86C",
|
foreground: "FFB86C",
|
||||||
fontStyle: "italic",
|
fontStyle: "italic",
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
token: "netscriptfunction",
|
token: "netscriptfunction",
|
||||||
|
@ -36,7 +36,7 @@ export function ps(
|
|||||||
}
|
}
|
||||||
terminal.print(res);
|
terminal.print(res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(args.length === 0){
|
if(args.length === 0){
|
||||||
for (let i = 0; i < server.runningScripts.length; i++) {
|
for (let i = 0; i < server.runningScripts.length; i++) {
|
||||||
const rsObj = server.runningScripts[i];
|
const rsObj = server.runningScripts[i];
|
||||||
|
@ -356,12 +356,12 @@ export function TerminalInput({ terminal, router, player }: IProps): React.React
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
modifyInput("deletewordbefore");
|
modifyInput("deletewordbefore");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.keyCode === KEY.D && event.altKey) {
|
if (event.keyCode === KEY.D && event.altKey) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
modifyInput("deletewordafter");
|
modifyInput("deletewordafter");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.keyCode === KEY.U && event.ctrlKey) {
|
if (event.keyCode === KEY.U && event.ctrlKey) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
modifyInput("clearbefore");
|
modifyInput("clearbefore");
|
||||||
|
@ -921,7 +921,7 @@ export const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [
|
|||||||
"The provided answer should be an array of strings containing the valid expressions.",
|
"The provided answer should be an array of strings containing the valid expressions.",
|
||||||
"The data provided by this problem is an array with two elements. The first element",
|
"The data provided by this problem is an array with two elements. The first element",
|
||||||
"is the string of digits, while the second element is the target number:\n\n",
|
"is the string of digits, while the second element is the target number:\n\n",
|
||||||
`["${digits}", ${target}]\n\n`,
|
`["${digits}", ${target}]\n\n`,
|
||||||
"NOTE: The order of evaluation expects script operator precedence",
|
"NOTE: The order of evaluation expects script operator precedence",
|
||||||
"NOTE: Numbers in the expression cannot have leading 0's. In other words,",
|
"NOTE: Numbers in the expression cannot have leading 0's. In other words,",
|
||||||
`"1+01" is not a valid expression`,
|
`"1+01" is not a valid expression`,
|
||||||
|
@ -288,4 +288,4 @@ function LogWindow(props: IProps): React.ReactElement {
|
|||||||
</Paper>
|
</Paper>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -75,4 +75,4 @@ export function subsetOf<Type, Key extends keyof Type, Value>(options: Value[]):
|
|||||||
}
|
}
|
||||||
obj[key] = validValues as unknown as Type[Key];
|
obj[key] = validValues as unknown as Type[Key];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user