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
@@ -3,6 +3,7 @@
import React, { createContext, useContext } from "react"
import { useAnalytics } from "@/providers"
import { AiAssistant } from "@/components"
// @ts-expect-error can't install the types package because it doesn't support React v19
import ReCAPTCHA from "react-google-recaptcha"
export type AiAssistantFeedbackType = "upvote" | "downvote"
@@ -18,6 +18,7 @@ import {
SearchResponse,
} from "algoliasearch/lite"
import clsx from "clsx"
// @ts-expect-error can't install the types package because it doesn't support React v19
import { CSSTransition, SwitchTransition } from "react-transition-group"
export type SearchCommand = {
@@ -208,6 +209,8 @@ export const SearchProvider = ({
}
}, [initialDefaultFilters])
const componentWrapperRef = useRef(null)
return (
<SearchContext.Provider
value={{
@@ -248,13 +251,14 @@ export const SearchProvider = ({
}}
timeout={250}
key={command?.name || "search"}
nodeRef={componentWrapperRef}
>
<>
<div ref={componentWrapperRef} className="h-full">
{command === null && (
<Search {...searchProps} algolia={algolia} />
)}
{command?.component}
</>
</div>
</CSSTransition>
</SwitchTransition>
</Modal>
@@ -53,7 +53,7 @@ export type SidebarContextType = {
setDesktopSidebarOpen: React.Dispatch<React.SetStateAction<boolean>>
staticSidebarItems?: boolean
shouldHandleHashChange: boolean
sidebarRef: React.RefObject<HTMLDivElement>
sidebarRef: React.RefObject<HTMLDivElement | null>
goBack: () => void
sidebarTopHeight: number
setSidebarTopHeight: React.Dispatch<React.SetStateAction<number>>
@@ -247,8 +247,8 @@ export const reducer = (
loaded: parent.changeLoaded
? true
: i.type === "link"
? i.loaded
: true,
? i.loaded
: true,
}
}
return i