Skip to content

Commit e20b753

Browse files
committed
chore: run React migration codemods, fix TypeScript errors
1 parent d25026e commit e20b753

22 files changed

+49
-35
lines changed

config/sidebar.folia.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ const folia: SidebarsConfig = {
5151
],
5252
};
5353

54-
export = folia;
54+
export default folia;

config/sidebar.misc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ const misc: SidebarsConfig = {
3737
],
3838
};
3939

40-
export = misc;
40+
export default misc;

config/sidebar.paper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,4 @@ const paper: SidebarsConfig = {
231231
],
232232
};
233233

234-
export = paper;
234+
export default paper;

config/sidebar.velocity.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,4 @@ const velocity: SidebarsConfig = {
116116
],
117117
};
118118

119-
export = velocity;
119+
export default velocity;

config/sidebar.waterfall.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ const waterfall: SidebarsConfig = {
1616
],
1717
};
1818

19-
export = waterfall;
19+
export default waterfall;

docusaurus.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
} from "./src/util/authorUtils";
1616
import { preview, deploymentID } from "./src/util/pagesUtils";
1717

18-
cacheAuthorData(preview || env.NODE_ENV === "development");
18+
cacheAuthorData(preview || env.NODE_ENV === "development").then();
1919

2020
const url =
2121
(preview && `https://${deploymentID}.papermc-docs.pages.dev`) || "https://docs.papermc.io";
@@ -282,4 +282,4 @@ const config: Config = {
282282
},
283283
};
284284

285-
export = config;
285+
export default config;

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"@docusaurus/theme-common": "3.7.0",
2828
"@docusaurus/theme-mermaid": "3.7.0",
2929
"@docusaurus/theme-search-algolia": "3.7.0",
30+
"@docusaurus/utils": "^3.7.0",
3031
"@floating-ui/react": "^0.27.6",
3132
"@fontsource/jetbrains-mono": "5.2.5",
3233
"@iconify/react": "5.2.1",
@@ -45,6 +46,7 @@
4546
"@docusaurus/tsconfig": "3.7.0",
4647
"@docusaurus/types": "3.7.0",
4748
"@fec/remark-a11y-emoji": "4.0.2",
49+
"@octokit/types": "^13.10.0",
4850
"@types/is-ci": "3.0.4",
4951
"@types/js-yaml": "^4.0.9",
5052
"@types/node": "22.14.0",

pnpm-lock.yaml

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Projects.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Link from "@docusaurus/Link";
22
import clsx from "clsx";
3-
import React from "react";
3+
import React, { type JSX } from "react";
44
import { Icon } from "@iconify/react";
55
import "../css/projects.css";
66

src/components/config/ConfigDocBlock.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState, useEffect, useRef, ReactNode } from "react";
1+
import React, { useState, useEffect, useRef, ReactNode, type JSX } from "react";
22
import ReactMarkdown from "react-markdown";
33
import style from "@site/src/css/markdown-styles.module.css";
44
import yaml from "js-yaml";
@@ -119,7 +119,7 @@ const parseItalics = (key: string) => {
119119
};
120120

121121
const parseDescriptionForVersioning = (description: String) => {
122-
return VersionFormattedCode({ children: description, plainText: true });
122+
return VersionFormattedCode({ children: description, plainText: true }) as string;
123123
};
124124

125125
const YamlNodeWithDescription = ({

0 commit comments

Comments
 (0)