Skip to content

Commit e56a959

Browse files
committed
lint: prevent logging in runtime scripts
1 parent 9caaae1 commit e56a959

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

eslint.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,15 @@ export default [
4444
],
4545
},
4646
},
47+
{
48+
files: ["src/scripts/**/*.{js,ts}"],
49+
rules: {
50+
"no-console": [
51+
"error",
52+
{
53+
allow: ["warn", "error"],
54+
},
55+
],
56+
},
57+
},
4758
];

src/scripts/explain-code.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ function getCodeBlockPosition(button: HTMLElement): number {
1010
while (currentBlock) {
1111
if (currentBlock.tagName === "PRE") {
1212
currentBlock = currentBlock.querySelector(codeSelector);
13-
console.log(currentBlock);
1413
break;
1514
}
1615
currentBlock = currentBlock.previousElementSibling;

0 commit comments

Comments
 (0)