From 59b18039ed790f9ffd9ce2b2008fc84b5dc921d5 Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 17 May 2026 09:45:49 +0200 Subject: [PATCH] refactor(observability): remove console.log from tags proxy and enforce no-console lint rule Co-Authored-By: Claude Sonnet 4.6 --- frontend/eslint.config.js | 12 +++++++++++- frontend/src/routes/api/tags/+server.ts | 1 - 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/frontend/eslint.config.js b/frontend/eslint.config.js index b110ade9..5ef17b59 100644 --- a/frontend/eslint.config.js +++ b/frontend/eslint.config.js @@ -38,7 +38,10 @@ export default defineConfig( 'no-undef': 'off', // This rule is designed for Svelte 5's own routing system using resolve(). // In SvelteKit, and goto() from $app/navigation are the correct patterns — resolve() is not needed. - 'svelte/no-navigation-without-resolve': 'off' + 'svelte/no-navigation-without-resolve': 'off', + // Prevents accidental console.log left in source. console.warn and console.error + // are still permitted for intentional server-side logging (e.g. hooks.server.ts). + 'no-console': ['error', { allow: ['warn', 'error'] }] } }, { @@ -71,6 +74,13 @@ export default defineConfig( ] } }, + { + // E2E tests use console.log for diagnostic output — allow it there. + files: ['e2e/**'], + rules: { + 'no-console': 'off' + } + }, { files: ['**/*.spec.ts', '**/*.test.ts'], rules: { diff --git a/frontend/src/routes/api/tags/+server.ts b/frontend/src/routes/api/tags/+server.ts index 1e2e760d..f985380e 100644 --- a/frontend/src/routes/api/tags/+server.ts +++ b/frontend/src/routes/api/tags/+server.ts @@ -24,7 +24,6 @@ export const GET: RequestHandler = async ({ url, fetch }) => { } const data = await response.json(); - console.log('Tags Data', data); // 4. Daten zurück an den Browser schicken return json(data);