add eslint rule for no-console

This commit is contained in:
Michael C 2021-10-20 01:01:58 -04:00
parent ec16828497
commit 815df94db4
No known key found for this signature in database
GPG key ID: FFB04FB3B878B7B4
2 changed files with 2 additions and 0 deletions

View file

@ -27,5 +27,6 @@ module.exports = {
"indent": ["warn", 4, { "SwitchCase": 1 }],
"object-curly-spacing": ["warn", "always"],
"require-await": "warn",
"no-console": "error"
},
};

View file

@ -79,6 +79,7 @@ class Logger {
if (levelStr.length === 4) {
levelStr += " "; // ensure logs are aligned
}
// eslint-disable-next-line no-console
console.log(colors.Dim, `${levelStr} ${new Date().toISOString()}: `, color, str, colors.Reset);
}
}