From 295462c0c631df05594eb3927569fc13440ac461 Mon Sep 17 00:00:00 2001 From: Antoine BERNIER Date: Sun, 18 Aug 2024 08:42:12 +0200 Subject: [PATCH] prettier all --- .lintstagedrc.mjs | 6 ++--- .prettierrc.mjs | 4 ++- bin/build.mjs | 2 +- next-env.d.ts | 10 +++---- src/app/[...slug]/Menu.tsx | 24 ++++++++--------- src/app/[...slug]/layout.tsx | 12 ++++----- src/app/[...slug]/page.tsx | 6 ++--- src/app/globals.css | 14 +++++----- src/app/page.tsx | 26 +++++++++---------- src/components/Codesandbox.tsx | 10 +++---- src/components/Nav.tsx | 8 +++--- src/components/Search/SearchItem.tsx | 6 ++--- src/components/Search/SearchModal.tsx | 16 ++++++------ .../Search/SearchModalContainer.tsx | 2 +- src/components/Search/index.tsx | 8 +++--- src/components/Toc.tsx | 6 ++--- src/components/ToggleTheme.tsx | 2 +- src/components/mdx/Grid.tsx | 10 +++---- src/components/mdx/Hint.tsx | 2 +- src/components/mdx/index.tsx | 14 +++++----- src/utils/docs.tsx | 6 ++--- src/utils/icon.ts | 4 +-- src/utils/text.ts | 2 +- 23 files changed, 101 insertions(+), 99 deletions(-) diff --git a/.lintstagedrc.mjs b/.lintstagedrc.mjs index 34d1439f..274c24d5 100644 --- a/.lintstagedrc.mjs +++ b/.lintstagedrc.mjs @@ -1,6 +1,6 @@ /** @type {import("lint-staged").Config} */ const config = { - "*": ["prettier --ignore-path .gitignore --ignore-unknown --write"], -}; + '*': ['prettier --ignore-path .gitignore --ignore-unknown --write'], +} -export default config; +export default config diff --git a/.prettierrc.mjs b/.prettierrc.mjs index 1bd426bb..2a12bbd5 100644 --- a/.prettierrc.mjs +++ b/.prettierrc.mjs @@ -3,7 +3,9 @@ const config = { semi: false, singleQuote: true, printWidth: 100, - plugins: ['prettier-plugin-tailwindcss'], + plugins: [ + 'prettier-plugin-tailwindcss', // MUST come last + ], } export default config diff --git a/bin/build.mjs b/bin/build.mjs index c6faee4b..470a9392 100755 --- a/bin/build.mjs +++ b/bin/build.mjs @@ -85,7 +85,7 @@ cmd.on('exit', async (code) => { console.log('Build completed successfully.') await exec( - `mkdir -p ${outHostDirAbsolute}; cp -rf ${outLocalDirAbsolute}/* ${outHostDirAbsolute}` + `mkdir -p ${outHostDirAbsolute}; cp -rf ${outLocalDirAbsolute}/* ${outHostDirAbsolute}`, ) console.log(`Preview: \`npx -y serve ${outHostDirAbsolute}\``) }) diff --git a/next-env.d.ts b/next-env.d.ts index 62b8a52d..4f11a03d 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,5 +1,5 @@ -/// -/// - -// NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/src/app/[...slug]/Menu.tsx b/src/app/[...slug]/Menu.tsx index 18b26fe1..f0bcd76a 100644 --- a/src/app/[...slug]/Menu.tsx +++ b/src/app/[...slug]/Menu.tsx @@ -31,11 +31,11 @@ export function Menu({ return ( <> -
-
+
+
{header}
-
+
diff --git a/src/app/[...slug]/layout.tsx b/src/app/[...slug]/layout.tsx index 4ae6d35a..032e1382 100644 --- a/src/app/[...slug]/layout.tsx +++ b/src/app/[...slug]/layout.tsx @@ -37,7 +37,7 @@ export default async function Layout({ params, children }: Props) { -
+
{NEXT_PUBLIC_LIBNAME_SHORT && ( @@ -46,7 +46,7 @@ export default async function Layout({ params, children }: Props) { {NEXT_PUBLIC_LIBNAME} @@ -78,7 +78,7 @@ export default async function Layout({ params, children }: Props) { footer={ <> {!!currentPage && ( -
+
+