From acc2bc6fef39ad39f171f2a21de7f5433b989e56 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 00:38:20 +0200 Subject: [PATCH] chore(deps): update dependency @biomejs/biome to v1.9.3 (#987) Signed-off-by: Giovanni Ravalico <15946771+suddenlyGiovanni@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Giovanni Ravalico <15946771+suddenlyGiovanni@users.noreply.github.com> --- .idea/biome.xml | 3 +- .idea/tailwindcss.xml | 2 +- apps/web/app/entry.server.tsx | 32 +- apps/web/app/header.tsx | 40 +- apps/web/app/root.tsx | 25 +- apps/web/app/routes/_index.tsx | 19 +- apps/web/app/routes/resume/basics.tsx | 59 ++- apps/web/app/routes/resume/dev-icons.tsx | 286 ++++++++++-- apps/web/app/routes/resume/education.tsx | 51 ++- apps/web/app/routes/resume/experience.tsx | 107 ++++- apps/web/app/routes/resume/experiences.tsx | 7 +- apps/web/app/routes/resume/interests.tsx | 5 +- apps/web/app/routes/resume/route.tsx | 11 +- apps/web/app/routes/resume/skills.tsx | 38 +- apps/web/app/schemas/test-utils.ts | 8 - apps/web/app/utils/env.server.ts | 1 - apps/web/biome.json | 13 + apps/web/vite.config.ts | 3 + biome.json | 63 ++- package.json | 2 +- packages/ui/biome.json | 17 +- .../accordion/accordion.stories.tsx | 426 ++++++++++++++---- .../src/components/button/button.stories.tsx | 10 +- .../ui/src/components/card/card.stories.tsx | 10 +- .../collapsible/collapsible.stories.tsx | 55 ++- .../dropdown-menu/dropdown-menu.stories.tsx | 15 +- packages/ui/src/components/icons/icons.tsx | 9 +- .../mode-toggle/mode-toggle.stories.tsx | 8 +- .../components/mode-toggle/mode-toggle.tsx | 7 +- .../navigation-menu.stories.tsx | 21 +- .../components/skeleton/skeleton.stories.tsx | 10 +- .../ui/src/components/social/social-icon.tsx | 12 +- .../suddenly-giovanni/suddenly-giovanni.tsx | 10 +- .../ui/src/components/typography/large.tsx | 6 +- .../ui/src/components/typography/lead.tsx | 6 +- .../components/typography/muted.stories.tsx | 1 + .../ui/src/components/typography/muted.tsx | 6 +- packages/ui/src/components/typography/p.tsx | 6 +- .../components/typography/prose.stories.tsx | 12 +- .../ui/src/components/typography/table.tsx | 6 +- .../typography/typography.stories.tsx | 1 - packages/ui/src/ui/accordion.tsx | 9 +- packages/ui/src/ui/avatar.tsx | 6 +- packages/ui/src/ui/badge.tsx | 8 +- packages/ui/src/ui/button.tsx | 8 +- packages/ui/src/ui/card.tsx | 24 +- packages/ui/src/ui/dropdown-menu.tsx | 19 +- packages/ui/src/ui/navigation-menu.tsx | 6 +- packages/ui/src/ui/switch.tsx | 2 +- pnpm-lock.yaml | 78 ++-- 50 files changed, 1238 insertions(+), 351 deletions(-) diff --git a/.idea/biome.xml b/.idea/biome.xml index e555652c4..fd0ff5c78 100644 --- a/.idea/biome.xml +++ b/.idea/biome.xml @@ -1,9 +1,10 @@ + \ No newline at end of file diff --git a/.idea/tailwindcss.xml b/.idea/tailwindcss.xml index b7e5ee570..d99399858 100644 --- a/.idea/tailwindcss.xml +++ b/.idea/tailwindcss.xml @@ -1,6 +1,6 @@ - \ No newline at end of file diff --git a/apps/web/app/entry.server.tsx b/apps/web/app/entry.server.tsx index 9d0ff9847..fef393a62 100644 --- a/apps/web/app/entry.server.tsx +++ b/apps/web/app/entry.server.tsx @@ -34,7 +34,11 @@ function handleBotRequest( return new Promise((resolve, reject) => { let shellRendered = false const { pipe, abort } = renderToPipeableStream( - , + , { onAllReady() { shellRendered = true @@ -58,11 +62,13 @@ function handleBotRequest( onError(error: unknown) { // biome-ignore lint/style/noParameterAssign: this is how Remix defined the default entry.server responseStatusCode = 500 - // Log streaming rendering errors from inside the shell. Don't log - // errors encountered during initial shell rendering since they'll - // reject and get logged in handleDocumentRequest. + /* + Log streaming rendering errors from inside the shell. Don't log + errors encountered during initial shell rendering since they'll + reject and get logged in handleDocumentRequest. + */ if (shellRendered) { - // biome-ignore lint/nursery/noConsole: + // biome-ignore lint/suspicious/noConsole: legit console error statement. console.error(error) } }, @@ -82,7 +88,11 @@ function handleBrowserRequest( return new Promise((resolve, reject) => { let shellRendered = false const { pipe, abort } = renderToPipeableStream( - , + , { onShellReady() { shellRendered = true @@ -106,11 +116,13 @@ function handleBrowserRequest( onError(error: unknown) { // biome-ignore lint/style/noParameterAssign: this is how Remix defined the default entry.server responseStatusCode = 500 - // Log streaming rendering errors from inside the shell. Don't log - // errors encountered during initial shell rendering since they'll - // reject and get logged in handleDocumentRequest. + /* + Log streaming rendering errors from inside the shell. Don't log + errors encountered during initial shell rendering since they'll + reject and get logged in handleDocumentRequest. + */ if (shellRendered) { - // biome-ignore lint/nursery/noConsole: + // biome-ignore lint/suspicious/noConsole: legit console error statement. console.error(error) } }, diff --git a/apps/web/app/header.tsx b/apps/web/app/header.tsx index 61b9c1728..663949858 100644 --- a/apps/web/app/header.tsx +++ b/apps/web/app/header.tsx @@ -10,7 +10,7 @@ import { clsx } from '@suddenlygiovanni/ui/lib/utils.ts' import { Button } from '@suddenlygiovanni/ui/ui/button.js' import type { action } from '~/root.tsx' -import { useOptimisticThemeMode } from '~/utils/theme.tsx' +import { type Theme, useOptimisticThemeMode } from '~/utils/theme.tsx' import avatarAssetUrl from './assets/giovanni_ravalico-profile_bw.webp' import { routesRecord } from './routes-record.ts' @@ -90,6 +90,17 @@ const routes = ( const PRIMARY_NAVIGATION = 'primary-navigation' +function computeNextThemeMode(mode: Theme): Theme { + const nextMode = + mode === 'system' // + ? 'light' + : // biome-ignore lint/nursery/noNestedTernary: FIXME: convert it to a State Machine obj + mode === 'light' + ? 'dark' + : 'system' + return nextMode +} + function ThemeSwitch({ userPreference, className, @@ -101,12 +112,6 @@ function ThemeSwitch({ const optimisticMode = useOptimisticThemeMode() const mode = optimisticMode ?? userPreference ?? 'system' - const nextMode = - mode === 'system' // - ? 'light' - : mode === 'light' - ? 'dark' - : 'system' const modeLabel = { light: ( @@ -119,15 +124,25 @@ function ThemeSwitch({ ), system: ( - + System ), } return ( - - + +
diff --git a/apps/web/app/root.tsx b/apps/web/app/root.tsx index c7fd3a7a2..dfdafd164 100644 --- a/apps/web/app/root.tsx +++ b/apps/web/app/root.tsx @@ -9,7 +9,7 @@ import type { import { Links, Meta, Scripts, ScrollRestoration, json, useLoaderData } from '@remix-run/react' import { Types, makeOpenGraphWebsite } from '@suddenlygiovanni/open-graph-protocol' import * as Either from 'effect/Either' -import type { ReactElement, ReactNode } from 'react' +import type { JSX, ReactElement, ReactNode } from 'react' import { Layout } from '@suddenlygiovanni/ui/components/layout/layout.tsx' import { clsx } from '@suddenlygiovanni/ui/lib/utils.ts' @@ -105,13 +105,23 @@ function Document({ theme?: 'light' | 'dark' | null // TODO: address this prop // biome-ignore lint/correctness/noUndeclaredVariables: env?: typeof ENV -}): ReactElement { +}): JSX.Element { return ( - + - - + + @@ -142,7 +152,10 @@ export default function App(): ReactElement { const data = useLoaderData() const theme = useTheme() return ( - +