From 815df94db4cd2097297fd5be7199dcedc363079c Mon Sep 17 00:00:00 2001 From: Michael C Date: Wed, 20 Oct 2021 01:01:58 -0400 Subject: [PATCH] add eslint rule for no-console --- .eslintrc.js | 1 + src/utils/logger.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 14b67b2..e96d7da 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -27,5 +27,6 @@ module.exports = { "indent": ["warn", 4, { "SwitchCase": 1 }], "object-curly-spacing": ["warn", "always"], "require-await": "warn", + "no-console": "error" }, }; diff --git a/src/utils/logger.ts b/src/utils/logger.ts index 56a7e95..8507a46 100644 --- a/src/utils/logger.ts +++ b/src/utils/logger.ts @@ -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); } }