Alexandru Cambose il y a 3 semaines
Parent
commit
e881a57a15

+ 0 - 4
apps/developer-hub/src/components/Pages/BasePage/index.tsx

@@ -12,12 +12,8 @@ import { getMDXComponents } from "../../../mdx-components";
 export function BasePage(props: { params: { slug: string[] } }) {
   const page = source.getPage(props.params.slug);
   if (!page) notFound();
-  // @ts-expect-error - body is a property of PageData, but not defined in the types
-  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
   const MDX = page.data.body;
   return (
-    // @ts-expect-error - toc and full are properties of PageData, but not defined in the types
-    // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
     <DocsPage toc={page.data.toc} full={page.data.full}>
       <DocsTitle>{page.data.title}</DocsTitle>
       <DocsDescription>{page.data.description}</DocsDescription>

+ 1 - 4
apps/developer-hub/src/lib/source.ts

@@ -55,10 +55,7 @@ export const source = loader({
     return icon ? createElement(icons[icon] ?? FolderSimpleDashed) : undefined;
   },
   source: docs.toFumadocsSource(),
-  pageTree: {
-    // @ts-expect-error - types are very similar but not exactly the same
-    transformers: [openapiPlugin()],
-  },
+  plugins: [openapiPlugin()],
 });
 
 export type Page = InferPageType<typeof source>;