From e56a959c10688cbbcb90a442425820e480bad4d8 Mon Sep 17 00:00:00 2001 From: "Colby M. White" <3979735+colbywhite@users.noreply.github.com> Date: Wed, 15 Apr 2026 08:41:23 -0500 Subject: [PATCH] lint: prevent logging in runtime scripts --- eslint.config.js | 11 +++++++++++ src/scripts/explain-code.ts | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/eslint.config.js b/eslint.config.js index 61434bb5cef..41fb4663836 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -44,4 +44,15 @@ export default [ ], }, }, + { + files: ["src/scripts/**/*.{js,ts}"], + rules: { + "no-console": [ + "error", + { + allow: ["warn", "error"], + }, + ], + }, + }, ]; diff --git a/src/scripts/explain-code.ts b/src/scripts/explain-code.ts index 26a0ace5fe8..110ddf8765a 100644 --- a/src/scripts/explain-code.ts +++ b/src/scripts/explain-code.ts @@ -10,7 +10,6 @@ function getCodeBlockPosition(button: HTMLElement): number { while (currentBlock) { if (currentBlock.tagName === "PRE") { currentBlock = currentBlock.querySelector(codeSelector); - console.log(currentBlock); break; } currentBlock = currentBlock.previousElementSibling;