diff --git a/app/dump/page.tsx b/app/dump/page.tsx index 1e9bb4c..b6d0b9a 100644 --- a/app/dump/page.tsx +++ b/app/dump/page.tsx @@ -103,6 +103,7 @@ function DumpContent() { useEffect(() => { if (bytebin) { + // eslint-disable-next-line react-hooks/set-state-in-effect fetchBytebinDump(); } else if (gist) { fetchGistDump(); diff --git a/cloudflare-env.d.ts b/cloudflare-env.d.ts index 950c48d..1a460b2 100644 --- a/cloudflare-env.d.ts +++ b/cloudflare-env.d.ts @@ -4426,7 +4426,7 @@ type AIGatewayHeaders = { [key: string]: string | number | boolean | object; }; type AIGatewayUniversalRequest = { - provider: AIGatewayProviders | string; // eslint-disable-line + provider: AIGatewayProviders | string; endpoint: string; headers: Partial; query: unknown; @@ -4443,7 +4443,7 @@ declare abstract class AiGateway { extraHeaders?: object; }, ): Promise; - getUrl(provider?: AIGatewayProviders | string): Promise; // eslint-disable-line + getUrl(provider?: AIGatewayProviders | string): Promise; } interface AutoRAGInternalError extends Error {} interface AutoRAGNotFoundError extends Error {} diff --git a/components/BetaBanner.tsx b/components/BetaBanner.tsx index 2d8063b..63d2bd6 100644 --- a/components/BetaBanner.tsx +++ b/components/BetaBanner.tsx @@ -15,6 +15,7 @@ export function BetaBanner() { useEffect(() => { const isDismissed = localStorage.getItem(BETA_BANNER_DISMISSED_KEY); if (!isDismissed) { + // eslint-disable-next-line react-hooks/set-state-in-effect setIsVisible(true); } diff --git a/components/footer.tsx b/components/footer.tsx index 45d579b..c493c1b 100644 --- a/components/footer.tsx +++ b/components/footer.tsx @@ -89,6 +89,7 @@ export default function Footer() { THEME_STORAGE_KEY, ) as ThemeMode | null; const initialThemeMode = savedThemeMode || 'auto'; + // eslint-disable-next-line react-hooks/set-state-in-effect setThemeMode(initialThemeMode); applyTheme(initialThemeMode, setColorScheme); }, [setColorScheme]); diff --git a/contexts/shared-data.tsx b/contexts/shared-data.tsx index b2348a1..7a0397b 100644 --- a/contexts/shared-data.tsx +++ b/contexts/shared-data.tsx @@ -227,12 +227,14 @@ export const SharedDataProvider = ({ }; useEffect(() => { + /* eslint-disable react-hooks/set-state-in-effect */ void fetchGithubData(); void fetchPatreonData(); void fetchDiscordData(); void fetchBuildData(); void fetchDownloads(); void loadVersionData(); + /* eslint-enable react-hooks/set-state-in-effect */ }, []); return ( diff --git a/next.config.ts b/next.config.ts index 04caed5..670782e 100644 --- a/next.config.ts +++ b/next.config.ts @@ -32,29 +32,101 @@ const nextConfig: NextConfig = { // Ported from https://github.com/EssentialsX/Website/blob/master/plugins/wiki-redirects/index.js // Paths missing /wiki/ prefix and .html extension { source: '/Home', destination: '/wiki/introduction', permanent: true }, - { source: '/Installing-EssentialsX', destination: '/wiki/installing', permanent: true }, - { source: '/Module-Breakdown', destination: '/wiki/modules', permanent: true }, - { source: '/Improvements', destination: '/wiki/improvements', permanent: true }, + { + source: '/Installing-EssentialsX', + destination: '/wiki/installing', + permanent: true, + }, + { + source: '/Module-Breakdown', + destination: '/wiki/modules', + permanent: true, + }, + { + source: '/Improvements', + destination: '/wiki/improvements', + permanent: true, + }, { source: '/Locale', destination: '/wiki/translations', permanent: true }, { source: '/Common-Issues', destination: '/wiki/faq', permanent: true }, - { source: '/Command-Cooldowns', destination: '/wiki/command-cooldowns', permanent: true }, - { source: '/Color-Permissions', destination: '/wiki/color-permissions', permanent: true }, - { source: '/BannerMeta', destination: '/wiki/banner-meta', permanent: true }, - { source: '/discord-tutorial', destination: '/wiki/discord', permanent: true }, - { source: '/Discord-Tutorial', destination: '/wiki/discord', permanent: true }, + { + source: '/Command-Cooldowns', + destination: '/wiki/command-cooldowns', + permanent: true, + }, + { + source: '/Color-Permissions', + destination: '/wiki/color-permissions', + permanent: true, + }, + { + source: '/BannerMeta', + destination: '/wiki/banner-meta', + permanent: true, + }, + { + source: '/discord-tutorial', + destination: '/wiki/discord', + permanent: true, + }, + { + source: '/Discord-Tutorial', + destination: '/wiki/discord', + permanent: true, + }, { source: '/geoip', destination: '/wiki/geo-ip', permanent: true }, { source: '/help', destination: '/wiki/faq', permanent: true }, // Paths missing /wiki/ prefix but with .html extension - { source: '/Home.html', destination: '/wiki/introduction', permanent: true }, - { source: '/Installing-EssentialsX.html', destination: '/wiki/installing', permanent: true }, - { source: '/Module-Breakdown.html', destination: '/wiki/modules', permanent: true }, - { source: '/Improvements.html', destination: '/wiki/improvements', permanent: true }, - { source: '/Locale.html', destination: '/wiki/translations', permanent: true }, - { source: '/Common-Issues.html', destination: '/wiki/faq', permanent: true }, - { source: '/Command-Cooldowns.html', destination: '/wiki/command-cooldowns', permanent: true }, - { source: '/Color-Permissions.html', destination: '/wiki/color-permissions', permanent: true }, - { source: '/BannerMeta.html', destination: '/wiki/banner-meta', permanent: true }, - { source: '/Discord-Tutorial.html', destination: '/wiki/discord', permanent: true }, + { + source: '/Home.html', + destination: '/wiki/introduction', + permanent: true, + }, + { + source: '/Installing-EssentialsX.html', + destination: '/wiki/installing', + permanent: true, + }, + { + source: '/Module-Breakdown.html', + destination: '/wiki/modules', + permanent: true, + }, + { + source: '/Improvements.html', + destination: '/wiki/improvements', + permanent: true, + }, + { + source: '/Locale.html', + destination: '/wiki/translations', + permanent: true, + }, + { + source: '/Common-Issues.html', + destination: '/wiki/faq', + permanent: true, + }, + { + source: '/Command-Cooldowns.html', + destination: '/wiki/command-cooldowns', + permanent: true, + }, + { + source: '/Color-Permissions.html', + destination: '/wiki/color-permissions', + permanent: true, + }, + { + source: '/BannerMeta.html', + destination: '/wiki/banner-meta', + permanent: true, + }, + { + source: '/Discord-Tutorial.html', + destination: '/wiki/discord', + permanent: true, + }, { source: '/geoip.html', destination: '/wiki/geo-ip', permanent: true }, { source: '/help.html', destination: '/wiki/faq', permanent: true }, {