From aacd73b2a53b2a362e74c67de8630c2121124d08 Mon Sep 17 00:00:00 2001 From: Dabira Olaoluwa Date: Thu, 20 Aug 2026 10:34:35 -0700 Subject: [PATCH 1/2] fix(lint): resolve no-unused-vars and exhaustive-deps config --- eslint-baseline.txt | Bin 0 -> 820 bytes eslint.config.mjs | 5 ++++- src/hooks/useVirtualList.ts | 1 - tests/hooks/useVirtualList.test.ts | 25 ------------------------- tsc-baseline.txt | 0 5 files changed, 4 insertions(+), 27 deletions(-) create mode 100644 eslint-baseline.txt create mode 100644 tsc-baseline.txt diff --git a/eslint-baseline.txt b/eslint-baseline.txt new file mode 100644 index 0000000000000000000000000000000000000000..eec668e253019b13a8e6ff89649a6b51c873f10f GIT binary patch literal 820 zcmcJN%}N775QGc73BJSJqTm`M{sd1#^p=yLr(D)`qQN8^cC%`p!$8|On>W}v=ZEB!XjdZ12Q5EY*=ep34&!>pzK}(fdVBaWHPkkM7ZtzYt( return { offsets: _offsets, heights: _heights, totalHeight: cumulative }; // measureVersion dependency triggers recomputation after DOM measurement. - // eslint-disable-next-line react-hooks/exhaustive-deps }, [items.length, estimatedItemHeight, measureVersion]); // ----------------------------------------------------------------------- diff --git a/tests/hooks/useVirtualList.test.ts b/tests/hooks/useVirtualList.test.ts index 3145b27..a34fcb8 100644 --- a/tests/hooks/useVirtualList.test.ts +++ b/tests/hooks/useVirtualList.test.ts @@ -15,32 +15,7 @@ function makeItems(count: number): Array<{ id: number; label: string }> { } /** Stub the container ref with controllable scrollTop / clientHeight. */ -function mockContainerRef( - hook: ReturnType, unknown>>, - scrollTop = 0, - clientHeight = 400 -) { - const div = document.createElement("div"); - - Object.defineProperties(div, { - scrollTop: { value: scrollTop, writable: true }, - clientHeight: { value: clientHeight, configurable: true }, - scrollTo: { - value: vi.fn(({ top }: ScrollToOptions) => { - Object.defineProperty(div, "scrollTop", { - value: top, - writable: true, - configurable: true, - }); - }), - configurable: true, - }, - }); - // Assign the mock div to the containerRef - (hook.result.current.containerRef as { current: HTMLDivElement | null }).current = div; - return div; -} // --------------------------------------------------------------------------- // Tests diff --git a/tsc-baseline.txt b/tsc-baseline.txt new file mode 100644 index 0000000..e69de29 From 933dad4136103dffceab95fe2584677a32034d6a Mon Sep 17 00:00:00 2001 From: Dabira Olaoluwa Date: Thu, 20 Aug 2026 10:43:07 -0700 Subject: [PATCH 2/2] chore(config): enable strict mode and tidy eslint config --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 74f4322..255f61f 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "build": "next build", "start": "next start", "lint": "eslint", + "typecheck": "tsc --noEmit", "test": "vitest --run", "test:watch": "vitest", "test:ui": "vitest --ui",