From 289903de0d54704d4dedf0ca59fccdb878534ac2 Mon Sep 17 00:00:00 2001 From: mrshmllow Date: Sat, 17 Sep 2022 17:13:13 +1000 Subject: [PATCH] prettier sweep --- .prettierignore | 2 ++ .prettierrc.json | 1 - additional.d.ts | 6 ++-- components/AmePreview.tsx | 8 +++--- components/DocWrapper.tsx | 2 +- components/HomeSection.tsx | 8 ++---- .../ThemeSwitcher/NativeThemeSwitcher.tsx | 4 +-- components/TreeItem.tsx | 14 ++++------ components/footer.tsx | 2 +- components/navbar.tsx | 14 +++++----- lib/tree.ts | 2 +- next.config.mjs | 11 ++++---- pages/_document.tsx | 5 +++- pages/blog/[...slug].tsx | 9 ++---- pages/docs/[[...slug]].tsx | 10 ++----- pages/index.tsx | 28 +++++++++---------- prettier.config.js | 4 +++ tailwind.config.js | 16 +++++------ 18 files changed, 69 insertions(+), 77 deletions(-) delete mode 100644 .prettierrc.json create mode 100644 prettier.config.js diff --git a/.prettierignore b/.prettierignore index a680367..9ff61a8 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,3 @@ .next +.yarn +.pnp* diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 0967ef4..0000000 --- a/.prettierrc.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/additional.d.ts b/additional.d.ts index 63dc2f5..3139776 100644 --- a/additional.d.ts +++ b/additional.d.ts @@ -1,4 +1,4 @@ type FrontMatter = { - title?: string - weight?: number -} + title?: string; + weight?: number; +}; diff --git a/components/AmePreview.tsx b/components/AmePreview.tsx index 754001a..4522224 100644 --- a/components/AmePreview.tsx +++ b/components/AmePreview.tsx @@ -1,12 +1,12 @@ const AmePreview = () => ( -
-

{"~"}

+
+

{"~"}

{">"} {" ame"} {" install neovim-git"}

-

All packages found

+

All packages found

neovim-git

Do you want to install these packages and package dependencies? @@ -61,7 +61,7 @@ const AmePreview = () => (

Net Upgrade Size:{" 0.19 MiB"}

-

+

{":: "}Proceed with installation? [Y/n]

diff --git a/components/DocWrapper.tsx b/components/DocWrapper.tsx index d79752e..2949930 100644 --- a/components/DocWrapper.tsx +++ b/components/DocWrapper.tsx @@ -3,7 +3,7 @@ import { FC, ReactNode } from "react"; const DocWrapper: FC<{ children: ReactNode }> = ({ children }) => { return ( <> -
+
{children}
diff --git a/components/HomeSection.tsx b/components/HomeSection.tsx index ea7121f..32cfc0f 100644 --- a/components/HomeSection.tsx +++ b/components/HomeSection.tsx @@ -4,12 +4,8 @@ const HomeSection: FC<{ children: ReactNode; className?: string }> = ({ children, className, }) => ( -
-
+
+
{children}
diff --git a/components/ThemeSwitcher/NativeThemeSwitcher.tsx b/components/ThemeSwitcher/NativeThemeSwitcher.tsx index fd5fd8c..c5a7b7e 100644 --- a/components/ThemeSwitcher/NativeThemeSwitcher.tsx +++ b/components/ThemeSwitcher/NativeThemeSwitcher.tsx @@ -17,7 +17,7 @@ const NativeThemeSwitcher = () => { } return ( -
+
{theme} @@ -25,7 +25,7 @@ const NativeThemeSwitcher = () => { onClick={(e) => { setTheme(e.currentTarget.value); }} - className="absolute appearance-none inset-0 w-full h-full opacity-0" + className="absolute inset-0 h-full w-full appearance-none opacity-0" > diff --git a/components/TreeItem.tsx b/components/TreeItem.tsx index c30b146..062aa60 100644 --- a/components/TreeItem.tsx +++ b/components/TreeItem.tsx @@ -13,9 +13,7 @@ const TreeNode: FC<{ node: TreeItem; path: string }> = ({ {children.length > 0 ? ( {pretty ? pretty : value} @@ -26,9 +24,9 @@ const TreeNode: FC<{ node: TreeItem; path: string }> = ({ {pretty ? pretty : value} @@ -41,9 +39,7 @@ const TreeNode: FC<{ node: TreeItem; path: string }> = ({ {children.length > 0 && (
{children.map((child) => ( diff --git a/components/footer.tsx b/components/footer.tsx index c4e6411..ea24de6 100644 --- a/components/footer.tsx +++ b/components/footer.tsx @@ -10,7 +10,7 @@ import Link from "next/link"; const Footer = () => (