Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterbrandsen committed Feb 5, 2024
1 parent 64214bf commit 93efd48
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
17 changes: 11 additions & 6 deletions src/exporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import beautify from "json-beautify";
const argv = minimist(process.argv.slice(2));

const discordUsername = argv.discordUsername || "Screeps Performance Server";
const avatarURL = argv.discordAvatarUrl || "https://user-images.githubusercontent.com/48334001/189509241-7f04fe66-a5bc-4791-ada7-4f948794ceb0.png";
const avatarURL =
argv.discordAvatarUrl ||
"https://user-images.githubusercontent.com/48334001/189509241-7f04fe66-a5bc-4791-ada7-4f948794ceb0.png";
const githubOwner = argv.githubOwner || "The-International-Screeps-Bot";
const githubRepo = argv.githubRepo || "The-International-Open-Source";
export default class Exporter {
Expand Down Expand Up @@ -184,18 +186,21 @@ export default class Exporter {
const timeRun = (endTime - startTime) / 1000 / 60 / 60; // in hours

const loggerText = loggerFile.success
? `**Filtered Logs:** ${loggerFile.pasteBinUrl} (${loggerFile.lineCount - 1
} logs)\n`
? `**Filtered Logs:** ${loggerFile.pasteBinUrl} (${
loggerFile.lineCount - 1
} logs)\n`
: "**Filtered Logs:** No log dump file found\n";
const historyText = historyFile.success
? `**Milestone History:** ${historyFile.pasteBinUrl} (${historyFile.lineCount - 1
} logs)\n`
? `**Milestone History:** ${historyFile.pasteBinUrl} (${
historyFile.lineCount - 1
} logs)\n`
: "**Milestone History:** No history file found\n";

return (
`**Performance Test Results**\n` +
`**Commit:** ${this.commitName}\n` +
`**Fails:** ${fails.length === 0 ? "No fails!" : `${fails.length} fails`
`**Fails:** ${
fails.length === 0 ? "No fails!" : `${fails.length} fails`
}\n` +
`**Game Time :** ${lastTickNumber}\n` +
`**Time:** Start: ${new Date(startTime).toISOString()} - End: ${new Date(
Expand Down
4 changes: 2 additions & 2 deletions src/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ export default class Helper {
await api.auth();

api.socket.connect();
api.socket.on("connected", () => { });
api.socket.on("auth", () => { });
api.socket.on("connected", () => {});
api.socket.on("auth", () => {});
api.socket.subscribe(`room:${room}`, statusUpdater);
api.socket.subscribe("console", (event) => {
if (event.data.messages) {
Expand Down

0 comments on commit 93efd48

Please sign in to comment.