Clean up web code errors and make CI enforce them

This commit is contained in:
Keavon Chambers
2024-09-24 01:33:02 -07:00
parent 14de67c5a7
commit 1ee5ffbbe8
18 changed files with 44 additions and 129 deletions
@@ -48,7 +48,7 @@
activeEntrySkipWatcher = false;
} else if (activeEntry !== DASH_ENTRY) {
// We need to set to the initial value first to track a right history step, as if we hover in initial selection.
dispatch("hoverInEntry", initialSelectedIndex);
if (initialSelectedIndex !== undefined) dispatch("hoverInEntry", initialSelectedIndex);
dispatch("selectedIndex", entries.flat().indexOf(activeEntry));
}
}
@@ -58,7 +58,7 @@
}
function dispatchHoverOutEntry() {
dispatch("hoverOutEntry", initialSelectedIndex);
if (initialSelectedIndex !== undefined) dispatch("hoverOutEntry", initialSelectedIndex);
}
function makeActiveEntry(): MenuListEntry {
@@ -14,7 +14,7 @@
const pointerPosition = (direction: ScrollbarDirection, e: PointerEvent): number => (direction === "Vertical" ? e.clientY : e.clientX);
const dispatch = createEventDispatcher<{ handlePosition: number; pressTrack: number; pointerup }>();
const dispatch = createEventDispatcher<{ handlePosition: number; pressTrack: number; pointerup: undefined }>();
export let direction: ScrollbarDirection = "Vertical";
export let handlePosition = 0.5;