From f6510ea9a10b425ea102dd705577477243d20796 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Thu, 31 Oct 2024 20:49:33 -0500 Subject: [PATCH] fix: locally linked --- .eslintrc.json | 34 +- .prettierrc | 11 +- .vscode/launch.json | 1 - components/ErrorPage.tsx | 4 +- components/Footer.tsx | 9 +- components/GitHubShareButton.tsx | 4 +- components/Loading.tsx | 14 +- components/LoadingIcon.tsx | 4 +- components/NotionPage.tsx | 17 +- components/NotionPageHeader.tsx | 13 +- components/Page404.tsx | 6 +- components/PageActions.tsx | 4 +- components/PageAside.tsx | 12 +- components/PageHead.tsx | 43 +- components/PageSocial.module.css | 4 +- components/PageSocial.tsx | 5 +- contributing.md | 52 +- lib/acl.ts | 2 +- lib/bootstrap-client.ts | 2 +- lib/config.ts | 12 +- lib/get-canonical-page-id.ts | 2 +- lib/get-config-value.ts | 2 +- lib/get-page-tweet.ts | 2 +- lib/get-site-map.ts | 18 +- lib/map-image-url.ts | 4 +- lib/map-page-url.ts | 4 +- lib/notion.ts | 6 +- lib/preview-images.ts | 10 +- lib/resolve-notion-page.ts | 2 +- lib/search-notion.ts | 8 +- lib/site-config.ts | 4 +- lib/types.ts | 5 +- license | 2 +- next-env.d.ts | 2 +- next.config.js | 65 +- package.json | 65 +- pages/404.tsx | 4 +- pages/[pageId].tsx | 5 +- pages/_app.tsx | 14 +- pages/_document.tsx | 4 +- pages/_error.tsx | 4 +- pages/api/notion-page-info.tsx | 18 +- pages/api/search-notion.ts | 9 +- pages/api/social-image.tsx | 15 +- pages/feed.tsx | 11 +- pages/index.tsx | 2 - pages/robots.txt.tsx | 4 +- pages/sitemap.xml.tsx | 6 +- pnpm-lock.yaml | 4458 ++++++++++++++++++++++++++++++ tsconfig.json | 5 +- yarn.lock | 3892 -------------------------- 51 files changed, 4744 insertions(+), 4161 deletions(-) create mode 100644 pnpm-lock.yaml delete mode 100644 yarn.lock diff --git a/.eslintrc.json b/.eslintrc.json index 545d039..4cd59f2 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,27 +1,17 @@ { "root": true, - "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint", "react", "react-hooks"], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:react/recommended", - "plugin:react-hooks/recommended", - "prettier" - ], - "settings": { - "react": { - "version": "detect" - } - }, - "env": { - "browser": true, - "node": true - }, + "extends": ["@fisch0920/eslint-config"], "rules": { - "@typescript-eslint/no-explicit-any": 0, - "@typescript-eslint/no-non-null-assertion": 0, - "@typescript-eslint/no-unused-vars": 2, - "react/prop-types": 0 + "react/prop-types": "off", + "unicorn/no-array-reduce": "off", + "unicorn/filename-case": "off", + "no-process-env": "off", + "array-callback-return": "off", + "jsx-a11y/click-events-have-key-events": "off", + "jsx-a11y/no-static-element-interactions": "off", + "jsx-a11y/media-has-caption": "off", + "jsx-a11y/interactive-supports-focus": "off", + "jsx-a11y/anchor-is-valid": "off", + "@typescript-eslint/naming-convention": "off" } } diff --git a/.prettierrc b/.prettierrc index 26d4848..af07fd2 100644 --- a/.prettierrc +++ b/.prettierrc @@ -7,14 +7,5 @@ "bracketSpacing": true, "bracketSameLine": false, "arrowParens": "always", - "trailingComma": "none", - "importOrder": [ - "^(react/(.*)$)|^(react$)|^(next/(.*)$)|^(next$)", - "", - "^(@/lib/(.*)$)|^(@/components/(.*)$)|^(@/styles/(.*)$)", - "^[./]" - ], - "importOrderSeparation": true, - "importOrderSortSpecifiers": true, - "importOrderGroupNamespaceSpecifiers": true + "trailingComma": "none" } diff --git a/.vscode/launch.json b/.vscode/launch.json index 62b7917..156a4bb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,7 +8,6 @@ "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/next", "runtimeArgs": ["dev"], "cwd": "${workspaceFolder}", - "port": 9229, "smartStep": true, "console": "integratedTerminal", "skipFiles": ["/**"], diff --git a/components/ErrorPage.tsx b/components/ErrorPage.tsx index 43720d4..9682dde 100644 --- a/components/ErrorPage.tsx +++ b/components/ErrorPage.tsx @@ -1,9 +1,7 @@ -import * as React from 'react' - import { PageHead } from './PageHead' import styles from './styles.module.css' -export const ErrorPage: React.FC<{ statusCode: number }> = ({ statusCode }) => { +export function ErrorPage({ statusCode }: { statusCode: number }) { const title = 'Error' return ( diff --git a/components/Footer.tsx b/components/Footer.tsx index 2e54526..e927b79 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -1,5 +1,3 @@ -import * as React from 'react' - import { FaEnvelopeOpenText } from '@react-icons/all-files/fa/FaEnvelopeOpenText' import { FaGithub } from '@react-icons/all-files/fa/FaGithub' import { FaLinkedin } from '@react-icons/all-files/fa/FaLinkedin' @@ -9,6 +7,7 @@ import { FaYoutube } from '@react-icons/all-files/fa/FaYoutube' import { FaZhihu } from '@react-icons/all-files/fa/FaZhihu' import { IoMoonSharp } from '@react-icons/all-files/io5/IoMoonSharp' import { IoSunnyOutline } from '@react-icons/all-files/io5/IoSunnyOutline' +import * as React from 'react' import * as config from '@/lib/config' import { useDarkMode } from '@/lib/use-dark-mode' @@ -17,7 +16,7 @@ import styles from './styles.module.css' // TODO: merge the data and icons from PageSocial with the social links in Footer -export const FooterImpl: React.FC = () => { +export function FooterImpl() { const [hasMounted, setHasMounted] = React.useState(false) const { isDarkMode, toggleDarkMode } = useDarkMode() const currentYear = new Date().getFullYear() @@ -36,7 +35,9 @@ export const FooterImpl: React.FC = () => { return (