Jelajahi Sumber

chore: fix type and lint checking errors

Aaron Bassett 6 bulan lalu
induk
melakukan
3914dcc8ce

+ 1 - 6
apps/developer-hub/next.config.js

@@ -1,10 +1,5 @@
-import createBundleAnalyzer from "@next/bundle-analyzer";
 import { createMDX } from "fumadocs-mdx/next";
 
-const withAnalyzer = createBundleAnalyzer({
-  enabled: process.env.ANALYZE === "true",
-});
-
 const config = {
   reactStrictMode: true,
   pageExtensions: ["ts", "tsx", "mdx"],
@@ -56,4 +51,4 @@ const config = {
 
 const withMDX = createMDX();
 
-export default withAnalyzer(withMDX(config));
+export default withMDX(config);

+ 1 - 2
apps/developer-hub/package.json

@@ -7,7 +7,7 @@
     "node": "22"
   },
   "scripts": {
-    "build:vercel": "next build",
+    "build": "next build",
     "build:analyze": "ANALYZE=true next build",
     "fix:format": "prettier --write .",
     "fix:lint:eslint": "eslint --fix .",
@@ -41,7 +41,6 @@
     "@cprussin/jest-config": "catalog:",
     "@cprussin/prettier-config": "catalog:",
     "@cprussin/tsconfig": "catalog:",
-    "@next/bundle-analyzer": "catalog:",
     "@svgr/webpack": "catalog:",
     "@tailwindcss/postcss": "catalog:",
     "@types/jest": "catalog:",

+ 2 - 1
apps/developer-hub/src/app/(docs)/[section]/[...slug]/page.tsx

@@ -1,9 +1,10 @@
 export { DocumentationPage as default } from "../../../../components/Pages/DocumentationPage";
 import type { Metadata } from "next";
 import { notFound } from "next/navigation";
+
 import { source } from "../../../../source";
 
-export async function generateStaticParams() {
+export function generateStaticParams() {
   return source.generateParams();
 }
 

+ 2 - 1
apps/developer-hub/src/app/(docs)/[section]/page.tsx

@@ -1,9 +1,10 @@
 export { LandingPage as default } from "../../../components/Pages/LandingPage";
 import type { Metadata } from "next";
 import { notFound } from "next/navigation";
+
 import { source } from "../../../source";
 
-export async function generateStaticParams() {
+export function generateStaticParams() {
   return source.generateParams();
 }
 

+ 1 - 0
apps/developer-hub/src/app/(docs)/layout.tsx

@@ -1,5 +1,6 @@
 import { DocsLayout } from "fumadocs-ui/layouts/docs";
 import type { ReactNode } from "react";
+
 import { docsOptions } from "../../config/layout.config";
 
 export default function Layout({ children }: { children: ReactNode }) {

+ 1 - 0
apps/developer-hub/src/app/(homepage)/layout.tsx

@@ -1,5 +1,6 @@
 import { HomeLayout } from "fumadocs-ui/layouts/home";
 import type { ReactNode } from "react";
+
 import { baseOptions } from "../../config/layout.config";
 
 export default function Layout({ children }: { children: ReactNode }) {

+ 1 - 0
apps/developer-hub/src/app/api/search/route.ts

@@ -1,4 +1,5 @@
 import { createFromSource } from "fumadocs-core/search/server";
+
 import { source } from "../../../source";
 
 export const { GET } = createFromSource(source);

+ 2 - 1
apps/developer-hub/src/components/Pages/BasePage/index.tsx

@@ -5,6 +5,7 @@ import {
   DocsTitle,
 } from "fumadocs-ui/page";
 import { notFound } from "next/navigation";
+
 import { getMDXComponents } from "../../../mdx-components";
 import { source } from "../../../source";
 
@@ -15,7 +16,7 @@ export function BasePage(props: { params: { slug: string[] } }) {
   const MDX = page.data.body;
 
   return (
-    <DocsPage toc={page.data.toc} full={page.data.full ?? false}>
+    <DocsPage toc={page.data.toc} full={page.data.full}>
       <DocsTitle>{page.data.title}</DocsTitle>
       <DocsDescription>{page.data.description}</DocsDescription>
       <DocsBody>

+ 1 - 8
apps/developer-hub/src/components/Pages/Homepage/index.tsx

@@ -1,16 +1,9 @@
-import type { ReactNode } from "react";
-
 import styles from "./index.module.scss";
 
-type Props = {
-  children?: ReactNode;
-};
-
-export const Homepage = ({ children }: Props) => {
+export const Homepage = () => {
   return (
     <div className={styles.landing}>
       <h2>Homepage Landing Page</h2>
-      {children}
     </div>
   );
 };

+ 1 - 0
apps/developer-hub/src/config/layout.config.tsx

@@ -1,5 +1,6 @@
 import type { DocsLayoutProps } from "fumadocs-ui/layouts/docs";
 import type { BaseLayoutProps } from "fumadocs-ui/layouts/shared";
+
 import { source } from "../source";
 
 export const baseOptions: BaseLayoutProps = {

+ 2 - 3
apps/developer-hub/src/source.ts

@@ -9,6 +9,7 @@ import {
 import type { InferMetaType, InferPageType } from "fumadocs-core/source";
 import { loader } from "fumadocs-core/source";
 import { createElement } from "react";
+
 import { docs } from "../.source";
 
 const icons: Record<string, React.ComponentType> = {
@@ -22,9 +23,7 @@ const icons: Record<string, React.ComponentType> = {
 export const source = loader({
   baseUrl: "/",
   icon(icon) {
-    return icon
-      ? createElement(icons[icon as keyof typeof icons] ?? FolderSimpleDashed)
-      : undefined;
+    return icon ? createElement(icons[icon] ?? FolderSimpleDashed) : undefined;
   },
   source: docs.toFumadocsSource(),
 });

+ 2 - 2
apps/developer-hub/turbo.json

@@ -2,7 +2,7 @@
   "$schema": "https://turbo.build/schema.json",
   "extends": ["//"],
   "tasks": {
-    "build:vercel": {
+    "build": {
       "env": [
         "VERCEL_ENV",
         "GOOGLE_ANALYTICS_ID",
@@ -26,7 +26,7 @@
       "cache": false
     },
     "start:prod": {
-      "dependsOn": ["//#install:modules", "build:vercel"]
+      "dependsOn": ["//#install:modules", "build"]
     },
     "test:lint": {
       "dependsOn": ["test:lint:eslint", "test:lint:stylelint"]

+ 1 - 85
pnpm-lock.yaml

@@ -54,9 +54,6 @@ catalogs:
     '@heroicons/react':
       specifier: ^2.2.0
       version: 2.2.0
-    '@next/bundle-analyzer':
-      specifier: ^15.3.2
-      version: 15.3.2
     '@next/third-parties':
       specifier: ^15.3.2
       version: 15.3.2
@@ -533,16 +530,13 @@ importers:
         version: 4.0.2(@testing-library/dom@10.4.0)(@typescript-eslint/eslint-plugin@8.29.0(@typescript-eslint/parser@8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2))(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2))(@typescript-eslint/parser@8.29.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.8.2))(eslint@9.23.0(jiti@2.4.2))(jest@29.7.0(@types/node@22.14.0)(ts-node@10.9.2(@types/node@22.14.0)(typescript@5.8.2)))(ts-node@10.9.2(@types/node@22.14.0)(typescript@5.8.2))(turbo@2.4.4)(typescript@5.8.2)
       '@cprussin/jest-config':
         specifier: 'catalog:'
-        version: 2.0.2(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(bufferutil@4.0.9)(eslint@9.23.0(jiti@2.4.2))(jest@29.7.0(@types/node@22.14.0)(ts-node@10.9.2(@types/node@22.14.0)(typescript@5.8.2)))(next@15.3.2(@babel/core@7.27.1)(@opentelemetry/api@1.9.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.86.1))(prettier@3.5.3)(typescript@5.8.2)(utf-8-validate@5.0.10)
+        version: 2.0.2(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(bufferutil@4.0.9)(esbuild@0.25.4)(eslint@9.23.0(jiti@2.4.2))(jest@29.7.0(@types/node@22.14.0)(ts-node@10.9.2(@types/node@22.14.0)(typescript@5.8.2)))(next@15.3.2(@babel/core@7.27.1)(@opentelemetry/api@1.9.0)(babel-plugin-react-compiler@19.1.0-rc.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.86.1))(prettier@3.5.3)(typescript@5.8.2)(utf-8-validate@6.0.3)
       '@cprussin/prettier-config':
         specifier: 'catalog:'
         version: 2.2.2(prettier@3.5.3)
       '@cprussin/tsconfig':
         specifier: 'catalog:'
         version: 3.1.2(typescript@5.8.2)
-      '@next/bundle-analyzer':
-        specifier: 'catalog:'
-        version: 15.3.2(bufferutil@4.0.9)(utf-8-validate@5.0.10)
       '@svgr/webpack':
         specifier: 'catalog:'
         version: 8.1.0(typescript@5.8.2)
@@ -4567,10 +4561,6 @@ packages:
     peerDependencies:
       postcss-selector-parser: ^7.0.0
 
-  '@discoveryjs/json-ext@0.5.7':
-    resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==}
-    engines: {node: '>=10.0.0'}
-
   '@dual-bundle/import-meta-resolve@4.1.0':
     resolution: {integrity: sha512-+nxncfwHM5SgAtrVzgpzJOI1ol0PkumhVo469KCf9lUi21IGcY90G98VuHm9VRrUypmAzawAHO9bs6hqeADaVg==}
 
@@ -6353,9 +6343,6 @@ packages:
   '@near-js/wallet-account@1.1.1':
     resolution: {integrity: sha512-NnoJKtogBQ7Qz+AP+LdF70BP8Az6UXQori7OjPqJLMo73bn6lh5Ywvegwd1EB7ZEVe4BRt9+f9QkbU5M8ANfAw==}
 
-  '@next/bundle-analyzer@15.3.2':
-    resolution: {integrity: sha512-zY5O1PNKNxWEjaFX8gKzm77z2oL0cnj+m5aiqNBgay9LPLCDO13Cf+FJONeNq/nJjeXptwHFT9EMmTecF9U4Iw==}
-
   '@next/env@15.3.2':
     resolution: {integrity: sha512-xURk++7P7qR9JG1jJtLzPzf0qEvqCN0A/T3DXf8IPMKo9/6FfjxtEffRJIIew/bIL4T3C2jLLqBor8B/zVlx6g==}
 
@@ -7084,9 +7071,6 @@ packages:
       webpack-plugin-serve:
         optional: true
 
-  '@polka/url@1.0.0-next.29':
-    resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==}
-
   '@prisma/instrumentation@5.22.0':
     resolution: {integrity: sha512-LxccF392NN37ISGxIurUljZSh1YWnphO34V5a0+T7FVQG2u9bhAXRTJpgmQ3483woVhkraQZFF7cbRrpbw/F4Q==}
 
@@ -13650,9 +13634,6 @@ packages:
     resolution: {integrity: sha512-8pYCQiL9Xdcg0UPSD3d+0KMlOjp+KGU5EPwYddgzQ7DATsg4fuUDjQtsYLmWjnk2obnNHgV3vE2Y4jejSOJVBQ==}
     engines: {node: '>=10'}
 
-  debounce@1.2.1:
-    resolution: {integrity: sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==}
-
   debug@2.6.9:
     resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
     peerDependencies:
@@ -17924,10 +17905,6 @@ packages:
     resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==}
     engines: {node: '>=4'}
 
-  mrmime@2.0.1:
-    resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==}
-    engines: {node: '>=10'}
-
   ms@2.0.0:
     resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==}
 
@@ -18411,10 +18388,6 @@ packages:
   openapi3-ts@3.1.0:
     resolution: {integrity: sha512-1qKTvCCVoV0rkwUh1zq5o8QyghmwYPuhdvtjv1rFjuOnJToXhQyF8eGjNETQ8QmGjr9Jz/tkAKLITIl2s7dw3A==}
 
-  opener@1.5.2:
-    resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==}
-    hasBin: true
-
   optimism@0.18.1:
     resolution: {integrity: sha512-mLXNwWPa9dgFyDqkNi54sjDyNJ9/fTI6WGBLgnXku1vdKY/jovHfZT5r+aiVeFFLOz+foPNOm5YJ4mqgld2GBQ==}
 
@@ -20282,10 +20255,6 @@ packages:
   sinon@18.0.1:
     resolution: {integrity: sha512-a2N2TDY1uGviajJ6r4D1CyRAkzE9NNVlYOV1wX5xQDuAk0ONgzgRl0EjCQuRCPxOwp13ghsMwt9Gdldujs39qw==}
 
-  sirv@2.0.4:
-    resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==}
-    engines: {node: '>= 10'}
-
   sisteransi@1.0.5:
     resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}
 
@@ -21066,10 +21035,6 @@ packages:
   toposort@2.0.2:
     resolution: {integrity: sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg==}
 
-  totalist@3.0.1:
-    resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==}
-    engines: {node: '>=6'}
-
   tough-cookie@2.5.0:
     resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==}
     engines: {node: '>=0.8'}
@@ -22183,11 +22148,6 @@ packages:
     resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==}
     engines: {node: '>=12'}
 
-  webpack-bundle-analyzer@4.10.1:
-    resolution: {integrity: sha512-s3P7pgexgT/HTUSYgxJyn28A+99mmLq4HsJepMPzu0R8ImJc52QNqaFYW1Z2z2uIb1/J3eYgaAWVpaC+v/1aAQ==}
-    engines: {node: '>= 10.13.0'}
-    hasBin: true
-
   webpack-dev-middleware@6.1.3:
     resolution: {integrity: sha512-A4ChP0Qj8oGociTs6UdlRUGANIGrCDL3y+pmQMc+dSsraXHCatFpmMey4mYELA+juqwUqwQsUgJJISXl1KWmiw==}
     engines: {node: '>= 14.15.0'}
@@ -26132,8 +26092,6 @@ snapshots:
     dependencies:
       postcss-selector-parser: 7.1.0
 
-  '@discoveryjs/json-ext@0.5.7': {}
-
   '@dual-bundle/import-meta-resolve@4.1.0': {}
 
   '@ecies/ciphers@0.2.3(@noble/ciphers@1.2.1)':
@@ -29667,13 +29625,6 @@ snapshots:
     transitivePeerDependencies:
       - encoding
 
-  '@next/bundle-analyzer@15.3.2(bufferutil@4.0.9)(utf-8-validate@5.0.10)':
-    dependencies:
-      webpack-bundle-analyzer: 4.10.1(bufferutil@4.0.9)(utf-8-validate@5.0.10)
-    transitivePeerDependencies:
-      - bufferutil
-      - utf-8-validate
-
   '@next/env@15.3.2': {}
 
   '@next/eslint-plugin-next@14.2.26':
@@ -30527,8 +30478,6 @@ snapshots:
       type-fest: 4.39.0
       webpack-hot-middleware: 2.26.1
 
-  '@polka/url@1.0.0-next.29': {}
-
   '@prisma/instrumentation@5.22.0':
     dependencies:
       '@opentelemetry/api': 1.9.0
@@ -41194,8 +41143,6 @@ snapshots:
     dependencies:
       mimic-fn: 3.1.0
 
-  debounce@1.2.1: {}
-
   debug@2.6.9:
     dependencies:
       ms: 2.0.0
@@ -47735,8 +47682,6 @@ snapshots:
 
   mri@1.2.0: {}
 
-  mrmime@2.0.1: {}
-
   ms@2.0.0: {}
 
   ms@2.1.1: {}
@@ -48295,8 +48240,6 @@ snapshots:
     dependencies:
       yaml: 2.7.1
 
-  opener@1.5.2: {}
-
   optimism@0.18.1:
     dependencies:
       '@wry/caches': 1.0.1
@@ -50857,12 +50800,6 @@ snapshots:
       nise: 6.1.1
       supports-color: 7.2.0
 
-  sirv@2.0.4:
-    dependencies:
-      '@polka/url': 1.0.0-next.29
-      mrmime: 2.0.1
-      totalist: 3.0.1
-
   sisteransi@1.0.5: {}
 
   slash@2.0.0: {}
@@ -51929,8 +51866,6 @@ snapshots:
 
   toposort@2.0.2: {}
 
-  totalist@3.0.1: {}
-
   tough-cookie@2.5.0:
     dependencies:
       psl: 1.15.0
@@ -53856,25 +53791,6 @@ snapshots:
 
   webidl-conversions@7.0.0: {}
 
-  webpack-bundle-analyzer@4.10.1(bufferutil@4.0.9)(utf-8-validate@5.0.10):
-    dependencies:
-      '@discoveryjs/json-ext': 0.5.7
-      acorn: 8.14.1
-      acorn-walk: 8.3.4
-      commander: 7.2.0
-      debounce: 1.2.1
-      escape-string-regexp: 4.0.0
-      gzip-size: 6.0.0
-      html-escaper: 2.0.2
-      is-plain-object: 5.0.0
-      opener: 1.5.2
-      picocolors: 1.1.1
-      sirv: 2.0.4
-      ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10)
-    transitivePeerDependencies:
-      - bufferutil
-      - utf-8-validate
-
   webpack-dev-middleware@6.1.3(webpack@5.98.0(esbuild@0.25.4)):
     dependencies:
       colorette: 2.0.20

+ 0 - 1
pnpm-workspace.yaml

@@ -61,7 +61,6 @@ catalog:
   "@floating-ui/react": ^0.27.6
   "@headlessui/react": ^2.2.0
   "@heroicons/react": ^2.2.0
-  "@next/bundle-analyzer": "^15.3.2"
   "@next/third-parties": ^15.3.2
   "@phosphor-icons/react": ^2.1.7
   "@pythnetwork/client": ^2.22.1