From 10decf5e9f06c8926bc75af14e0211c32e32be15 Mon Sep 17 00:00:00 2001 From: Ilya Azin Date: Tue, 8 Dec 2020 15:37:34 +0300 Subject: [PATCH] refactor(relevant-comments): add debug mode --- lib/rules/relevant-comments.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rules/relevant-comments.js b/lib/rules/relevant-comments.js index 1c27ebf..575eb37 100644 --- a/lib/rules/relevant-comments.js +++ b/lib/rules/relevant-comments.js @@ -86,7 +86,8 @@ const meta = { /** @type {import("./types").RelevantCommentsOptions} */ const __default = defaults(schema[0]); -// DEBUG: let __counter = 0; +const DEBUG = true; +let __counter = 0; /* eslint-disable max-lines-per-function */ @@ -96,7 +97,7 @@ const __default = defaults(schema[0]); * !!! FIXME: temp, decompose!!! refactor! */ function create(context) { - // DEBUG: console.log(">>>>>", ++__counter); + if (DEBUG) console.log(">>>>>", ++__counter); const code = context.getSourceCode(); const file = context.getFilename();