From c9b7dbef4f6bf85192bc722818bec3805ed91793 Mon Sep 17 00:00:00 2001 From: formax68 Date: Sun, 17 May 2026 10:11:36 +0300 Subject: [PATCH] fix(08-04): clean up Plan 03 disable directives and console.log site MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plan 03 added 6 `// eslint-disable-next-line no-console -- DEBUG flag (Phase 8 D-07)` comments expecting Plan 04 to activate `no-console` globally. The `no-console` rule is OFF in obsidianmd's recommended config (not just in the Phase-8 override), so the disables never had effect — they become "unused eslint-disable directive" warnings once the Phase-8 override is removed. Also changes CalendarService.ts:303 from `console.log` to `console.debug` so it complies with `obsidianmd/rule-custom-message` (which disallows console.log but allows console.debug). The MemoChron: prefix convention is preserved. Removed disables: CalendarService.ts:302,388,407,458 and timezoneUtils.ts:211,221. Prepares the tree for the Phase-8 override-block deletion in the next commit. --- src/services/CalendarService.ts | 6 +----- src/utils/timezoneUtils.ts | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/services/CalendarService.ts b/src/services/CalendarService.ts index 85ce4ac..efd5cde 100644 --- a/src/services/CalendarService.ts +++ b/src/services/CalendarService.ts @@ -299,8 +299,7 @@ export class CalendarService { return cacheData.events; } } catch (error) { - // eslint-disable-next-line no-console -- DEBUG flag (Phase 8 D-07) - if (DEBUG) console.log("MemoChron: No cache found or cache invalid", errorMessage(error)); + if (DEBUG) console.debug("MemoChron: No cache found or cache invalid", errorMessage(error)); } finally { this.isLoadingCache = false; } @@ -385,7 +384,6 @@ export class CalendarService { } else if (response.status === 404) { new Notice(`MemoChron: Calendar "${source.name}" not found. Please check the URL.`); } else { - // eslint-disable-next-line no-console -- DEBUG flag (Phase 8 D-07) if (DEBUG) console.error( `Failed to fetch calendar ${source.name}: ${response.status} ${ response.text || "Unknown error" @@ -404,7 +402,6 @@ export class CalendarService { return this.parseCalendarData(response.text, source); } catch (error) { const message = errorMessage(error); - // eslint-disable-next-line no-console -- DEBUG flag (Phase 8 D-07) if (DEBUG) console.error(`Error fetching calendar ${source.name}:`, message); // Check for specific error types @@ -455,7 +452,6 @@ export class CalendarService { (response.text && (response.text.includes('