This is an automated email from the ASF dual-hosted git repository.

wu-sheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-horizon-ui.git


The following commit(s) were added to refs/heads/main by this push:
     new fbdebac  lint: switch → if/else exhaustive 
(vue/return-in-computed-property) + drop unused no-console disable directive
fbdebac is described below

commit fbdebacf18165e9c9d564371003288043e293ff7
Author: Wu Sheng <[email protected]>
AuthorDate: Tue May 19 20:58:17 2026 +0800

    lint: switch → if/else exhaustive (vue/return-in-computed-property) + drop 
unused no-console disable directive
---
 .../src/features/admin/global-defaults/GlobalDefaultsAdmin.vue | 10 +++++-----
 apps/ui/src/utils/debug.ts                                     |  1 -
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/apps/ui/src/features/admin/global-defaults/GlobalDefaultsAdmin.vue 
b/apps/ui/src/features/admin/global-defaults/GlobalDefaultsAdmin.vue
index dc86d8a..8b50209 100644
--- a/apps/ui/src/features/admin/global-defaults/GlobalDefaultsAdmin.vue
+++ b/apps/ui/src/features/admin/global-defaults/GlobalDefaultsAdmin.vue
@@ -194,11 +194,11 @@ function precisionForMinutes(m: number): 'MINUTE' | 
'HOUR' | 'DAY' {
 const draftPrecision = computed(() => 
precisionForMinutes(timeDraftMinutes.value));
 const draftBucketCount = computed(() => {
   const m = timeDraftMinutes.value;
-  switch (draftPrecision.value) {
-    case 'MINUTE': return m;            // 60-min window → 60 one-minute 
buckets
-    case 'HOUR':   return Math.round(m / 60);
-    case 'DAY':    return Math.round(m / 60 / 24);
-  }
+  // 60-min window @ MINUTE step → 60 one-minute buckets;
+  // hour-precision divides by 60, day-precision by 60*24.
+  if (draftPrecision.value === 'MINUTE') return m;
+  if (draftPrecision.value === 'HOUR') return Math.round(m / 60);
+  return Math.round(m / 60 / 24);
 });
 
 // ── Diff modal state ──────────────────────────────────────────────
diff --git a/apps/ui/src/utils/debug.ts b/apps/ui/src/utils/debug.ts
index 06e3108..7399b95 100644
--- a/apps/ui/src/utils/debug.ts
+++ b/apps/ui/src/utils/debug.ts
@@ -83,7 +83,6 @@ export function reloadDebugScopes(): void {
  *  around expensive computations. */
 export function debug(scope: string, ...args: unknown[]): void {
   if (!enabledFor(scope)) return;
-  // eslint-disable-next-line no-console
   console.debug(`[${scope}]`, ...args);
 }
 

Reply via email to