Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ export default antfu(
{
react: true,
nextjs: true,
typescript: true,
typescript: {
tsconfigPath: 'tsconfig.json',
},

// Configuration preferences
lessOpinionated: true,
Expand Down Expand Up @@ -35,6 +37,7 @@ export default antfu(
// --- Custom Rule Overrides ---
{
rules: {
'react/no-implicit-key': 'off', // Fixes linting errors on configuration files
'antfu/no-top-level-await': 'off', // Allow top-level await
'style/brace-style': ['error', '1tbs'], // Use the default brace style
'ts/consistent-type-definitions': ['error', 'type'], // Use `type` instead of `interface`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@commitlint/cli": "^20.4.2",
"@commitlint/config-conventional": "^20.4.2",
"@commitlint/types": "^20.4.0",
"@eslint-react/eslint-plugin": "^2.9.4",
"@eslint-react/eslint-plugin": "^2.13.0",
"@next/bundle-analyzer": "^16.1.6",
"@next/eslint-plugin-next": "^16.1.6",
"@types/node": "^25.3.0",
Expand Down
374 changes: 187 additions & 187 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/app/404/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dynamic from 'next/dynamic';

const NotFoundCanvas = dynamic(() => import('@/components/NotFoundCanvas'), {
const NotFoundCanvas = dynamic(async () => import('@/components/NotFoundCanvas'), {
loading: () => <div style={{ height: '200px' }} />,
});

Expand Down
2 changes: 1 addition & 1 deletion src/app/[[...mdxPath]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type PageProps = Readonly<{
}>;
}>;

const Wrapper = getMDXComponents().wrapper;
const Wrapper = getMDXComponents().wrapper!;

const Page: FC<PageProps> = async (props) => {
const params = await props.params;
Expand Down
7 changes: 4 additions & 3 deletions src/components/NotFoundCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export default function NotFoundCanvas() {
};

const drawScene = () => {
if (requestRef.current) {
if (requestRef.current !== undefined) {
cancelAnimationFrame(requestRef.current);
}

Expand Down Expand Up @@ -157,7 +157,8 @@ export default function NotFoundCanvas() {
for (let y = 0, y2 = data.height; y < y2; y = y + 4) {
for (let x = 0, x2 = data.width; x < x2; x = x + 4) {
const index = (y * 4 * data.width) + (x * 4) + 3;
if (data.data[index] !== undefined && data.data[index]! > 128) {
const pixelValue = data.data[index];
if (pixelValue !== undefined && pixelValue > 128) {
particlesRef.current.push(new Particle(x + padding, y + padding));
}
}
Expand Down Expand Up @@ -189,7 +190,7 @@ export default function NotFoundCanvas() {
canvas.addEventListener('click', disperseParticlesMouse);

return () => {
if (requestRef.current) {
if (requestRef.current !== undefined) {
cancelAnimationFrame(requestRef.current);
}
window.removeEventListener('resize', drawScene);
Expand Down
4 changes: 2 additions & 2 deletions src/mdx-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ const docsComponents = getDocsMDXComponents({
QRCode,
});

export const useMDXComponents: UseMDXComponents<typeof docsComponents> = (
export const useMDXComponents: UseMDXComponents<MDXComponents> = (
components?: MDXComponents,
) => ({
...docsComponents,
...components,
}) as any;
});
1 change: 1 addition & 0 deletions src/theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ const config = {
nextThemes: {
defaultTheme: 'dark',
},
// eslint-disable-next-line react/no-unnecessary-use-prefix
useNextSeoProps() {
return {
titleTemplate: '%s | ConnectBot',
Expand Down