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
This commit is contained in:
parent
2e5d91f8f8
commit
e0d4782c80
2 changed files with 8 additions and 8 deletions
|
|
@ -50,16 +50,16 @@ export function useResizablePanel({
|
||||||
|
|
||||||
// Keep callbacks in refs to avoid stale closures in mousemove listener
|
// Keep callbacks in refs to avoid stale closures in mousemove listener
|
||||||
const onWidthChangeRef = useRef(onWidthChange);
|
const onWidthChangeRef = useRef(onWidthChange);
|
||||||
onWidthChangeRef.current = onWidthChange;
|
|
||||||
|
|
||||||
const minWidthRef = useRef(minWidth);
|
const minWidthRef = useRef(minWidth);
|
||||||
minWidthRef.current = minWidth;
|
|
||||||
|
|
||||||
const maxWidthRef = useRef(maxWidth);
|
const maxWidthRef = useRef(maxWidth);
|
||||||
maxWidthRef.current = maxWidth;
|
|
||||||
|
|
||||||
const sideRef = useRef(side);
|
const sideRef = useRef(side);
|
||||||
sideRef.current = side;
|
|
||||||
|
useEffect(() => {
|
||||||
|
onWidthChangeRef.current = onWidthChange;
|
||||||
|
minWidthRef.current = minWidth;
|
||||||
|
maxWidthRef.current = maxWidth;
|
||||||
|
sideRef.current = side;
|
||||||
|
});
|
||||||
|
|
||||||
const handleMouseMove = useCallback(
|
const handleMouseMove = useCallback(
|
||||||
(e: MouseEvent) => {
|
(e: MouseEvent) => {
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ const sanitizeSchema: SanitizeSchema = {
|
||||||
attributes: {
|
attributes: {
|
||||||
...defaultSchema.attributes,
|
...defaultSchema.attributes,
|
||||||
// Allow title on abbr (for tooltip definitions)
|
// Allow title on abbr (for tooltip definitions)
|
||||||
abbr: [...(defaultSchema.attributes?.['abbr'] ?? []), 'title'],
|
abbr: [...(defaultSchema.attributes?.abbr ?? []), 'title'],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue