docs: update to next 15 + eslint 9 (#9839)

* update next

* updated react

* update eslint

* finish updating eslint

* fix content lint errors

* fix docs test

* fix vale action

* fix installation errors
This commit is contained in:
Shahed Nasser
2024-11-13 17:03:17 +02:00
committed by GitHub
parent 6f7467f071
commit 938f3bd934
143 changed files with 4193 additions and 3226 deletions
@@ -7,7 +7,7 @@ import {
TokenInputProps,
TokenOutputProps,
} from "prism-react-renderer"
import React, { useCallback, useMemo } from "react"
import React, { useCallback, useMemo, useRef } from "react"
import { CodeBlockCollapsibleLines } from "../../components/CodeBlock/Collapsible/Lines"
import { useCollapsible } from "../use-collapsible"
@@ -22,7 +22,7 @@ export type CollapsibleCodeLines = {
token: Token[][],
highlightProps: HighlightProps,
lineNumberOffset?: number
) => React.ReactNode
) => React.JSX.Element[]
}
export type CollapsedCodeLinesPosition = "start" | "end"
@@ -65,10 +65,12 @@ export const useCollapsibleCodeLines = ({
return collapsedRange.start === 1 ? "start" : "end"
}, [collapsedRange])
const ref = useRef(null)
const collapsibleHookResult = useCollapsible({
unmountOnExit: false,
translateEnabled: false,
heightAnimation: true,
childrenRef: ref,
})
const getCollapsedLinesElm = useCallback(