diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index 56ecf82..0000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "extends": ["next/core-web-vitals"],
- "rules": {
- "@next/next/no-img-element": "off",
- "react/jsx-uses-vars": "error",
- "react/jsx-sort-props": 2
- }
-}
diff --git a/.prettierignore b/.prettierignore
deleted file mode 100644
index 44f3ac0..0000000
--- a/.prettierignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*.woff2
-*.woff2
-*.ttf
\ No newline at end of file
diff --git a/.prettierrc b/.prettierrc
deleted file mode 100644
index bc519c2..0000000
--- a/.prettierrc
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "printWidth": 120,
- "endOfLine": "auto",
- "trailingComma": "all",
- "plugins": ["prettier-plugin-tailwindcss", "prettier-plugin-organize-imports", "react"]
-}
diff --git a/biome.json b/biome.json
new file mode 100644
index 0000000..097651c
--- /dev/null
+++ b/biome.json
@@ -0,0 +1,39 @@
+{
+ "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
+ "files": {
+ "ignore": [".next", "VSCodeCounter", ".turbo", "node_modules"]
+ },
+ "formatter": {
+ "indentStyle": "space",
+ "lineWidth": 120
+ },
+ "organizeImports": {
+ "enabled": true
+ },
+ "linter": {
+ "enabled": true,
+ "rules": {
+ "a11y": {
+ "useKeyWithClickEvents": "off"
+ },
+ "complexity": {
+ "noForEach": "off"
+ },
+ "correctness": {
+ "useExhaustiveDependencies": "off"
+ },
+ "suspicious": {
+ "noExplicitAny": "off"
+ },
+ "style": {
+ "noParameterAssign": "off",
+ "noNonNullAssertion": "off",
+ "useNodejsImportProtocol": "off"
+ },
+ "nursery": {
+ "useSortedClasses": "error"
+ },
+ "recommended": true
+ }
+ }
+}
diff --git a/components/homepage/HomeCover.tsx b/components/homepage/HomeCover.tsx
index 984dbf4..26931b5 100644
--- a/components/homepage/HomeCover.tsx
+++ b/components/homepage/HomeCover.tsx
@@ -6,7 +6,7 @@ export const HomeCover = () => {
<>
- {Config.Nickname}
+ {Config.Nickname}
{Config.Sentence && (
-
{Config.Sentence}
+
{Config.Sentence}
)}
diff --git a/components/layouts/index.tsx b/components/layouts/index.tsx
index 2552cc7..ca1a585 100644
--- a/components/layouts/index.tsx
+++ b/components/layouts/index.tsx
@@ -3,5 +3,5 @@ export const Page = ({ children }: { children: React.ReactNode }) => {
};
export const ContentContainer = ({ children }: { children: React.ReactNode }) => {
- return
{children};
+ return
{children};
};
diff --git a/components/mdx/Blockquote.tsx b/components/mdx/Blockquote.tsx
index dc3e6e3..1888529 100644
--- a/components/mdx/Blockquote.tsx
+++ b/components/mdx/Blockquote.tsx
@@ -2,7 +2,7 @@ const Blockquote = (props: JSX.IntrinsicElements["blockquote"]) => {
return (
{props.children}
diff --git a/components/mdx/H2.tsx b/components/mdx/H2.tsx
index cb1ecb4..7ae8fdc 100644
--- a/components/mdx/H2.tsx
+++ b/components/mdx/H2.tsx
@@ -1,6 +1,6 @@
const H2 = (props: JSX.IntrinsicElements["h2"]) => {
return (
-
+
{props.children}
);
diff --git a/components/mdx/ImageWrapper.tsx b/components/mdx/ImageWrapper.tsx
index cc0ec37..2b7f343 100644
--- a/components/mdx/ImageWrapper.tsx
+++ b/components/mdx/ImageWrapper.tsx
@@ -2,9 +2,9 @@
// but all the attributes of the img tag.
const ImageWrapper = (props: JSX.IntrinsicElements["img"]) => {
return (
-
+

-
{props.alt}
+
{props.alt}
);
};
diff --git a/components/mdx/PreWrapper.tsx b/components/mdx/PreWrapper.tsx
index aa3bccc..eeeac38 100644
--- a/components/mdx/PreWrapper.tsx
+++ b/components/mdx/PreWrapper.tsx
@@ -23,7 +23,7 @@ const PreWrapper = ({ children }: { children: JSX.Element }) => {
return (
{
{hovered && (
)}
-
+
{children}
diff --git a/components/mdx/TableWrapper.tsx b/components/mdx/TableWrapper.tsx
index 073e4dc..36e3405 100644
--- a/components/mdx/TableWrapper.tsx
+++ b/components/mdx/TableWrapper.tsx
@@ -1,6 +1,6 @@
const TableWrapper = ({ children }: { children: React.ReactNode }) => {
return (
-
+
);
diff --git a/components/readerpage/BottomCard.tsx b/components/readerpage/BottomCard.tsx
index 370dccc..4884fa3 100644
--- a/components/readerpage/BottomCard.tsx
+++ b/components/readerpage/BottomCard.tsx
@@ -2,8 +2,8 @@ import { Config } from "@/data/config";
export const BottomCard = () => {
return (
-
-

+
+
{Config.Sentence}
);
diff --git a/components/readerpage/DrawerTOC.tsx b/components/readerpage/DrawerTOC.tsx
index 381fd7a..4910319 100644
--- a/components/readerpage/DrawerTOC.tsx
+++ b/components/readerpage/DrawerTOC.tsx
@@ -1,7 +1,7 @@
import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from "@/components/ui/sheet";
import { useActiveHeading } from "@/hooks/useActiveHeading";
import useDrawerTOCState from "@/stores/useDrawerTOCState";
-import { TTOCItem } from "@/types/toc.type";
+import type { TTOCItem } from "@/types/toc.type";
import Link from "next/link";
import { MdMenuBook } from "react-icons/md";
import { twMerge } from "tailwind-merge";
@@ -13,7 +13,7 @@ export const DrawerTOC = (props: { data: TTOCItem[] }) => {
return (
setIsTOCOpen(!isTOCOpen)} title="Open the table of contents">
@@ -24,12 +24,12 @@ export const DrawerTOC = (props: { data: TTOCItem[] }) => {
{"TABLE OF CONTENTS"}
-
+
{props.data?.map((item) => (
{
return (
- {props.allowShare != false ? (
+
+ {props.allowShare !== false ? (
<>
@@ -39,13 +39,13 @@ export const ShareButtons = (props: {
text={copyShareText}
>
>
) : (
- {"SHARING IS NOT ALLOWED"}
+ {"SHARING IS NOT ALLOWED"}
)}
);
diff --git a/components/readerpage/TOC.tsx b/components/readerpage/TOC.tsx
index e026555..7e2e0af 100644
--- a/components/readerpage/TOC.tsx
+++ b/components/readerpage/TOC.tsx
@@ -1,5 +1,5 @@
import { useActiveHeading } from "@/hooks/useActiveHeading";
-import { TTOCItem } from "@/types/toc.type";
+import type { TTOCItem } from "@/types/toc.type";
import Link from "next/link";
import { twMerge } from "tailwind-merge";
@@ -8,16 +8,16 @@ export const TOC = (props: { data: TTOCItem[] }) => {
return (
-
+
{"TABLE OF CONTENTS"}
-
+
{props.data?.map((item) => (
{
setIsCopiedList(Config.Sponsor?.Crypto?.map(() => false) ?? []);
}}
>
-
+
{Config.Sponsor?.Crypto && (
-
+
-
{"Crypto"}
+
{"Crypto"}
{"Supports BTC, USDT and ETH."}
@@ -40,11 +40,11 @@ export const SponsorBoard = () => {
)}
{Config.Sponsor?.Github && Config.SocialLinks.github && (
-
+
-
{"Github Sponsor"}
+ {"Github Sponsor"}
@@ -57,11 +57,11 @@ export const SponsorBoard = () => {
)}
{!isEmptyString(Config.Sponsor?.WechatPayQRCodeContent) && (
-
+
-
{"Wechat Pay"}
+ {"Wechat Pay"}
@@ -70,11 +70,11 @@ export const SponsorBoard = () => {
)}
{!isEmptyString(Config.Sponsor?.AlipayLink) && (
-
+
-
{"Alipay"}
+ {"Alipay"}
@@ -87,11 +87,11 @@ export const SponsorBoard = () => {
)}
{!isEmptyString(Config.Sponsor?.PaypalId) && (
-
+
-
{"Paypal"}
+ {"Paypal"}
@@ -104,11 +104,11 @@ export const SponsorBoard = () => {
)}
{!isEmptyString(Config.Sponsor?.PatreonId) && (
-
+
-
{"Patreon"}
+ {"Patreon"}
@@ -125,7 +125,7 @@ export const SponsorBoard = () => {
{"CRYPTO"}
-
+
NOTE: Please confirm the corresponding block network and address before transferring money to
avoid loss.
@@ -133,9 +133,9 @@ export const SponsorBoard = () => {
{Config.Sponsor?.Crypto?.map((cryptoItem, cryptoItemIndex) => (
-
+
-
{`${cryptoItem.Name} - ${cryptoItem.Blockchain}`}
+
{`${cryptoItem.Name} - ${cryptoItem.Blockchain}`}
@@ -148,7 +148,7 @@ export const SponsorBoard = () => {
text={cryptoItem.Address}
>