From e9c11668034fc82401f110e8bccbf9ff929c7185 Mon Sep 17 00:00:00 2001 From: David Tejada Date: Thu, 5 May 2022 18:48:28 +0200 Subject: [PATCH] Remove console.log in production --- package.json | 3 ++- src/content/hints.ts | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 337431ef..bc3710b4 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "import/extensions": [ 2, "never" - ] + ], + "node/prefer-global/process": "off" } }, "prettier": { diff --git a/src/content/hints.ts b/src/content/hints.ts index 2144606d..e4e78ff9 100644 --- a/src/content/hints.ts +++ b/src/content/hints.ts @@ -23,8 +23,6 @@ export async function displayHints(intersectors: Intersector[]) { intersector.hintText = undefined; } - console.log(intersectors); - const hints = intersectors.filter((intersector) => { return ( intersector.clickableType && @@ -43,8 +41,12 @@ export async function displayHints(intersectors: Intersector[]) { hintsContainer.append(hint.hintElement); } - console.log(hints); document.body.append(hintsContainer); + + if (process.env["NODE_ENV"] !== "production") { + console.log("intersectors:", intersectors); + console.log("hints", hints); + } }, 300); } }