Fix the remaning linter warnings (#353)

Refactor the code base to remove all of the remaining warnings from
ESLint and convert them into errors.
This commit is contained in:
Hornwitser authored and GitHub committed 2021-01-05 22:28:08 +01:00
1 parent 9243731646
commit 1b901f5d1c
33 files changed
+718 -609

No files matched your search

+4 -4
View File
@@ -21,9 +21,9 @@ const libErrors = require("@clusterio/lib/errors");
function formatServerOutput(parsed) {
let time = "";
if (parsed.format === "seconds") {
time = chalk.yellow(parsed.time.padStart(8)) + " ";
time = `${chalk.yellow(parsed.time.padStart(8))} `;
} else if (parsed.format === "date") {
time = chalk.yellow(parsed.time) + " ";
time = `${chalk.yellow(parsed.time)} `;
}
let info = "";
@@ -41,10 +41,10 @@ function formatServerOutput(parsed) {
level = chalk.bold.redBright(level);
}
info = level + " " + chalk.gray(parsed.file) + ": ";
info = `${level} ${chalk.gray(parsed.file)}: `;
} else if (parsed.type === "action") {
info = "[" + chalk.yellow(parsed.action) + "] ";
info = `[${chalk.yellow(parsed.action)}] `;
}
return time + info + parsed.message;