fuzzyworld

when-am-i / commit

Remove a stray debug console.log and guard against new ones

3765de0e189e91eb5d94bb1ddeb02ff881ae5301 · Pavel Safronov · 2026-06-23 22:38:34 -0700 · parents f6c3f0c24f7e

Claude Code usage: this commit ~64.6K out / ~2.6M cached (first commit of its session: everything since it began) · cost unknown (no per-model trailer) · session 4 tally 9.6K in / 64.6K out / 2.6M cached · usage by commit and session

Remove a stray debug console.log and guard against new ones

App rendered `console.log("root URL: …")` on every render — a leftover
debug line that shipped to the deployed site and spammed the browser
console. Drop it (the rootUrl const is still used by the header link).

Add a `no-console` ESLint rule (allowing warn/error for genuine
diagnostics like report.ts) so a stray console.log fails lint/CI rather
than slipping through again.

Usage: 9.6K in / 64.6K out / 2.6M cached (session tally)
rtk:   2.4M saved, 94.8% over 768 cmds (global/lifetime)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
 eslint.config.js | 3 +++
 src/App.tsx      | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/eslint.config.js b/eslint.config.js
index c245d15..c4b34eb 100644
--- a/eslint.config.js
+++ b/eslint.config.js
@@ -19,6 +19,9 @@ export default tseslint.config(
                 'warn',
                 { allowConstantExport: true },
             ],
+            // No stray debug logging in shipped code; console.warn/error are
+            // allowed for genuine diagnostics (see utils/report.ts).
+            'no-console': ['error', { allow: ['warn', 'error'] }],
         },
     },
 );
diff --git a/src/App.tsx b/src/App.tsx
index 77659d9..bb08ec1 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -177,7 +177,6 @@ function App() {
     };
 
     const rootUrl = typeof window !== 'undefined' ? `${window.location.origin}${window.location.pathname}` : '/';
-    console.log(`root URL: ${rootUrl}`);
 
     return (
         <div className="app">