From b4502d7bc6b6bd1dd5bd9705f63af768719bfb45 Mon Sep 17 00:00:00 2001 From: kumarabhirup Date: Fri, 20 Feb 2026 00:42:22 -0800 Subject: [PATCH] fix: prefix unused watcherReady with underscore --- apps/web/app/api/workspace/watch/route.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/web/app/api/workspace/watch/route.ts b/apps/web/app/api/workspace/watch/route.ts index 75dd64f8b96..e75777ced84 100644 --- a/apps/web/app/api/workspace/watch/route.ts +++ b/apps/web/app/api/workspace/watch/route.ts @@ -15,7 +15,7 @@ let listeners = new Set(); // eslint-disable-next-line @typescript-eslint/no-explicit-any let sharedWatcher: any = null; let sharedRoot: string | null = null; -let watcherReady = false; +let __watcherReady = false; async function ensureWatcher(root: string) { if (sharedWatcher && sharedRoot === root) {return;} @@ -25,7 +25,7 @@ async function ensureWatcher(root: string) { await sharedWatcher.close(); sharedWatcher = null; sharedRoot = null; - watcherReady = false; + _watcherReady = false; } try { @@ -54,7 +54,7 @@ async function ensureWatcher(root: string) { for (const fn of listeners) {fn(eventType, rel);} }); - sharedWatcher.once("ready", () => {watcherReady = true;}); + sharedWatcher.once("ready", () => {_watcherReady = true;}); sharedWatcher.on("error", () => { // Swallow; polling mode shouldn't hit EMFILE but be safe. @@ -69,7 +69,7 @@ function stopWatcherIfIdle() { sharedWatcher.close(); sharedWatcher = null; sharedRoot = null; - watcherReady = false; + _watcherReady = false; } /**