diff --git a/.eslintrc.json b/.eslintrc.json index 545d039632..4cd59f27f7 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 26d4848990..af07fd2623 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 62b7917c36..156a4bb240 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 43720d45d2..9682dde71f 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 2e5452627b..e927b79606 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 (