From c8b814988567cefdd966bcd2dccb1f9a0a235cc8 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sat, 11 Nov 2023 20:59:02 +0000 Subject: [PATCH] refactor: remove the console expressions It is considered a best practice to avoid the use of any `console` methods in JavaScript code that will run on the browser. **NOTE:** If your repository contains a server side project, you can add `"nodejs"` to the `environment` property of analyzer meta in `.deepsource.toml`. This will prevent this issue from getting raised. Documentation for the analyzer meta can be found [here](https://docs.deepsource.com/docs/analyzers-javascript#meta). Alternatively, you can silence this issue for your repository [as shown here](https://deepsource.com/blog/releases-issue-actions). If a specific `console` call is meant to stay for other reasons, you can add [a skipcq comment](https://docs.deepsource.com/docs/issues-ignore-rules#silencing-a-specific-issue) to that line. This will inform other developers about the reason behind the log's presence, and prevent DeepSource from flagging it. --- js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index b4d5d23..4145bbd 100644 --- a/js/main.js +++ b/js/main.js @@ -1,6 +1,6 @@ const observer = new IntersectionObserver((entries) => { entries.forEach((entry) =>{ - console.log(entry) + if (entry.isIntersecting) { entry.target.classList.add('show'); } else {