From e0d4782c80aea739dccbc0965f7da0d51ff99a2b Mon Sep 17 00:00:00 2001 From: iliya Date: Tue, 24 Mar 2026 12:39:06 +0200 Subject: [PATCH] fix(lint): resolve ESLint errors breaking CI validate - markdownPlugins.ts: use dot notation for abbr attribute access - useResizablePanel.ts: wrap ref.current assignments in useEffect to comply with react-hooks/refs rule --- src/renderer/hooks/useResizablePanel.ts | 14 +++++++------- src/renderer/utils/markdownPlugins.ts | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/renderer/hooks/useResizablePanel.ts b/src/renderer/hooks/useResizablePanel.ts index 9400ba9c..29f518af 100644 --- a/src/renderer/hooks/useResizablePanel.ts +++ b/src/renderer/hooks/useResizablePanel.ts @@ -50,16 +50,16 @@ export function useResizablePanel({ // Keep callbacks in refs to avoid stale closures in mousemove listener const onWidthChangeRef = useRef(onWidthChange); - onWidthChangeRef.current = onWidthChange; - const minWidthRef = useRef(minWidth); - minWidthRef.current = minWidth; - const maxWidthRef = useRef(maxWidth); - maxWidthRef.current = maxWidth; - const sideRef = useRef(side); - sideRef.current = side; + + useEffect(() => { + onWidthChangeRef.current = onWidthChange; + minWidthRef.current = minWidth; + maxWidthRef.current = maxWidth; + sideRef.current = side; + }); const handleMouseMove = useCallback( (e: MouseEvent) => { diff --git a/src/renderer/utils/markdownPlugins.ts b/src/renderer/utils/markdownPlugins.ts index a4089d76..1652702b 100644 --- a/src/renderer/utils/markdownPlugins.ts +++ b/src/renderer/utils/markdownPlugins.ts @@ -37,7 +37,7 @@ const sanitizeSchema: SanitizeSchema = { attributes: { ...defaultSchema.attributes, // Allow title on abbr (for tooltip definitions) - abbr: [...(defaultSchema.attributes?.['abbr'] ?? []), 'title'], + abbr: [...(defaultSchema.attributes?.abbr ?? []), 'title'], }, };