diff --git a/.vscode/settings.json b/.vscode/settings.json index 3298a026..7a098f11 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,4 +8,4 @@ "quickfix.biome": "explicit", "source.organizeImports.biome": "explicit" } -} \ No newline at end of file +} diff --git a/actions/subscribe.ts b/actions/subscribe.ts index 4b68c2e2..6a48e382 100644 --- a/actions/subscribe.ts +++ b/actions/subscribe.ts @@ -1,8 +1,8 @@ 'use server'; -import { z } from 'zod'; import { resend } from '@/lib/resend'; import { parseError } from '@/lib/utils'; +import { z } from 'zod'; const audienceId = process.env.RESEND_AUDIENCE_ID; diff --git a/app/(pages)/(home)/cards/announcement.tsx b/app/(pages)/(home)/cards/announcement.tsx index 92ed1b4a..d3402cc8 100644 --- a/app/(pages)/(home)/cards/announcement.tsx +++ b/app/(pages)/(home)/cards/announcement.tsx @@ -1,7 +1,7 @@ -import { get } from '@vercel/edge-config'; +import { Card } from '@/components/card'; import { Link } from '@/components/link'; import { cn } from '@/lib/utils'; -import { Card } from '@/components/card'; +import { get } from '@vercel/edge-config'; import type { ReactElement } from 'react'; export const AnnouncementCard = async (): Promise => { diff --git a/app/(pages)/(home)/cards/github.tsx b/app/(pages)/(home)/cards/github.tsx index 30b399c5..17bcd7d9 100644 --- a/app/(pages)/(home)/cards/github.tsx +++ b/app/(pages)/(home)/cards/github.tsx @@ -1,9 +1,9 @@ 'use client'; -import GitHubCalendar from 'react-github-calendar'; -import { useState } from 'react'; import { Card } from '@/components/card'; +import { useState } from 'react'; import type { FC } from 'react'; +import GitHubCalendar from 'react-github-calendar'; type Activity = { date: string; diff --git a/app/(pages)/(home)/cards/spotify.tsx b/app/(pages)/(home)/cards/spotify.tsx index 98c9104f..0d86ad05 100644 --- a/app/(pages)/(home)/cards/spotify.tsx +++ b/app/(pages)/(home)/cards/spotify.tsx @@ -1,9 +1,9 @@ +import type { SpotifyProperties } from '@/app/api/cron/spotify/route'; +import { Card } from '@/components/card'; +import { Link } from '@/components/link'; import { get } from '@vercel/edge-config'; import Image from 'next/image'; -import { Link } from '@/components/link'; -import { Card } from '@/components/card'; import type { ReactElement } from 'react'; -import type { SpotifyProperties } from '@/app/api/cron/spotify/route'; const SpotifyCard = async (): Promise => { const song = await get('spotify'); diff --git a/app/(pages)/(home)/cards/steam.tsx b/app/(pages)/(home)/cards/steam.tsx index f21b88a5..0e7ea014 100644 --- a/app/(pages)/(home)/cards/steam.tsx +++ b/app/(pages)/(home)/cards/steam.tsx @@ -1,8 +1,8 @@ -import Image from 'next/image'; -import { get } from '@vercel/edge-config'; -import { Link } from '@/components/link'; -import { Card } from '@/components/card'; import type { GameProperties } from '@/app/api/cron/steam/route'; +import { Card } from '@/components/card'; +import { Link } from '@/components/link'; +import { get } from '@vercel/edge-config'; +import Image from 'next/image'; import type { ReactElement } from 'react'; const SteamCard = async (): Promise => { diff --git a/app/(pages)/(home)/components/avatar.tsx b/app/(pages)/(home)/components/avatar.tsx index 44bbbfc8..2161a651 100644 --- a/app/(pages)/(home)/components/avatar.tsx +++ b/app/(pages)/(home)/components/avatar.tsx @@ -1,7 +1,7 @@ -import Image from 'next/image'; import { cn } from '@/lib/utils'; -import Profile from './avatar.jpg'; +import Image from 'next/image'; import type { FC } from 'react'; +import Profile from './avatar.jpg'; export const Avatar: FC = () => ( => { const github = await get<{ followers: number }>('github'); diff --git a/app/(pages)/(home)/components/location.tsx b/app/(pages)/(home)/components/location.tsx index c0cc1d0b..5af1363b 100644 --- a/app/(pages)/(home)/components/location.tsx +++ b/app/(pages)/(home)/components/location.tsx @@ -1,5 +1,5 @@ -import { get } from '@vercel/edge-config'; import { cn } from '@/lib/utils'; +import { get } from '@vercel/edge-config'; import type { ReactElement } from 'react'; export const Location = async (): Promise => { diff --git a/app/(pages)/(home)/components/newsletter.tsx b/app/(pages)/(home)/components/newsletter.tsx index 95619315..8b325039 100644 --- a/app/(pages)/(home)/components/newsletter.tsx +++ b/app/(pages)/(home)/components/newsletter.tsx @@ -1,9 +1,9 @@ 'use client'; -import { useFormState, useFormStatus } from 'react-dom'; import { subscribe } from '@/actions/subscribe'; import { cn } from '@/lib/utils'; import type { FC } from 'react'; +import { useFormState, useFormStatus } from 'react-dom'; const SubmitButton: FC = () => { const { pending } = useFormStatus(); diff --git a/app/(pages)/(home)/page.tsx b/app/(pages)/(home)/page.tsx index b6cfe81f..2699d636 100644 --- a/app/(pages)/(home)/page.tsx +++ b/app/(pages)/(home)/page.tsx @@ -1,14 +1,14 @@ -import { Newsletter } from './components/newsletter'; -import GitHubCard from './cards/github'; +import type { Metadata } from 'next'; +import type { FC } from 'react'; import { AnnouncementCard } from './cards/announcement'; +import GitHubCard from './cards/github'; import SpotifyCard from './cards/spotify'; import SteamCard from './cards/steam'; +import { Avatar } from './components/avatar'; +import { GitHub } from './components/github'; import { Location } from './components/location'; +import { Newsletter } from './components/newsletter'; import { Wave } from './components/wave'; -import { GitHub } from './components/github'; -import { Avatar } from './components/avatar'; -import type { FC } from 'react'; -import type { Metadata } from 'next'; export const metadata: Metadata = { title: 'Hayden Bleasel', diff --git a/app/(pages)/blog/[slug]/page.tsx b/app/(pages)/blog/[slug]/page.tsx index ecf68179..e88a5ae5 100644 --- a/app/(pages)/blog/[slug]/page.tsx +++ b/app/(pages)/blog/[slug]/page.tsx @@ -1,13 +1,13 @@ -import { notFound } from 'next/navigation'; -import Image from 'next/image'; -import { ArrowLeftToLineIcon } from 'lucide-react'; -import { allBlogs } from '@contentlayer/generated'; -import { Mdx } from '@/components/mdx'; -import { Link } from '@/components/link'; import { Header } from '@/components/header'; +import { Link } from '@/components/link'; +import { Mdx } from '@/components/mdx'; import { siteUrl } from '@/lib/consts'; -import type { FC } from 'react'; +import { allBlogs } from '@contentlayer/generated'; +import { ArrowLeftToLineIcon } from 'lucide-react'; import type { Metadata } from 'next'; +import Image from 'next/image'; +import { notFound } from 'next/navigation'; +import type { FC } from 'react'; type PageProperties = { readonly params: { diff --git a/app/(pages)/contact/components/contact-form.tsx b/app/(pages)/contact/components/contact-form.tsx index ee99edc5..3938c29a 100644 --- a/app/(pages)/contact/components/contact-form.tsx +++ b/app/(pages)/contact/components/contact-form.tsx @@ -1,11 +1,11 @@ 'use client'; -import { useFormState, useFormStatus } from 'react-dom'; import { Card } from '@/components/card'; import { Input, Select, Textarea } from '@/components/form'; import { cn } from '@/lib/utils'; -import { contact } from '../actions/contact'; import type { FC } from 'react'; +import { useFormState, useFormStatus } from 'react-dom'; +import { contact } from '../actions/contact'; const SubmitButton: FC = () => { const { pending } = useFormStatus(); diff --git a/app/(pages)/contact/page.tsx b/app/(pages)/contact/page.tsx index 48b59756..fa13555a 100644 --- a/app/(pages)/contact/page.tsx +++ b/app/(pages)/contact/page.tsx @@ -1,7 +1,7 @@ import { Header } from '@/components/header'; -import { ContactForm } from './components/contact-form'; import type { Metadata } from 'next'; import type { FC } from 'react'; +import { ContactForm } from './components/contact-form'; const title = 'Contact'; const description = diff --git a/app/(pages)/features/page.tsx b/app/(pages)/features/page.tsx index 248db670..68b65b34 100644 --- a/app/(pages)/features/page.tsx +++ b/app/(pages)/features/page.tsx @@ -1,7 +1,7 @@ +import { Header } from '@/components/header'; import { Link } from '@/components/link'; -import speaking from '@/data/speaking.json'; import features from '@/data/features.json'; -import { Header } from '@/components/header'; +import speaking from '@/data/speaking.json'; import type { Metadata } from 'next'; import type { FC } from 'react'; diff --git a/app/(pages)/stack/page.tsx b/app/(pages)/stack/page.tsx index cd513b61..52a682c0 100644 --- a/app/(pages)/stack/page.tsx +++ b/app/(pages)/stack/page.tsx @@ -1,10 +1,10 @@ -import Image from 'next/image'; -import { Link } from '@/components/link'; -import stack from '@/data/stack.json'; import { Card } from '@/components/card'; import { Header } from '@/components/header'; +import { Link } from '@/components/link'; +import stack from '@/data/stack.json'; import { cn } from '@/lib/utils'; import type { Metadata } from 'next'; +import Image from 'next/image'; import type { FC } from 'react'; const title = 'Stack'; diff --git a/app/(pages)/work/page.tsx b/app/(pages)/work/page.tsx index 325cd3dd..174f3059 100644 --- a/app/(pages)/work/page.tsx +++ b/app/(pages)/work/page.tsx @@ -1,7 +1,7 @@ +import { Header } from '@/components/header'; import { Link } from '@/components/link'; -import work from '@/data/work.json'; import clients from '@/data/clients.json'; -import { Header } from '@/components/header'; +import work from '@/data/work.json'; import type { Metadata } from 'next'; import type { FC } from 'react'; diff --git a/app/about/inline-image.tsx b/app/about/inline-image.tsx index 6b994919..701535ca 100644 --- a/app/about/inline-image.tsx +++ b/app/about/inline-image.tsx @@ -1,5 +1,5 @@ -import Image from 'next/image'; import { Link } from '@/components/link'; +import Image from 'next/image'; import type { StaticImageData } from 'next/image'; import type { FC } from 'react'; diff --git a/app/about/page.tsx b/app/about/page.tsx index 5ff89509..a036cb81 100644 --- a/app/about/page.tsx +++ b/app/about/page.tsx @@ -1,21 +1,21 @@ import Image from 'next/image'; +import PageLayout from '@/app/(pages)/layout'; +import { Header } from '@/components/header'; import { Link } from '@/components/link'; import { cn } from '@/lib/utils'; -import { Header } from '@/components/header'; -import PageLayout from '@/app/(pages)/layout'; +import type { COBEOptions } from 'cobe'; +import type { Metadata } from 'next'; +import type { StaticImageData } from 'next/image'; +import type { FC } from 'react'; import { Travel } from '../components/travel'; import Avatar from './avatar.jpg'; -import Profile from './profile.jpg'; -import Refraction from './refraction.jpg'; import Corellium from './corellium.svg'; import Eververse from './eververse.svg'; -import Jellypepper from './jellypepper.svg'; import { InlineImage } from './inline-image'; -import type { COBEOptions } from 'cobe'; -import type { StaticImageData } from 'next/image'; -import type { Metadata } from 'next'; -import type { FC } from 'react'; +import Jellypepper from './jellypepper.svg'; +import Profile from './profile.jpg'; +import Refraction from './refraction.jpg'; export const metadata: Metadata = { title: 'About', diff --git a/app/globals.css b/app/globals.css index b49f26f7..aafdb6b5 100644 --- a/app/globals.css +++ b/app/globals.css @@ -39,11 +39,11 @@ code > [data-line]::before { counter-increment: line; } -code[data-line-numbers-max-digits='2'] > [data-line]::before { +code[data-line-numbers-max-digits="2"] > [data-line]::before { @apply w-6; } -code[data-line-numbers-max-digits='3'] > [data-line]::before { +code[data-line-numbers-max-digits="3"] > [data-line]::before { @apply w-8; } diff --git a/app/layout.tsx b/app/layout.tsx index 0666fa46..90ae8f8b 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,12 +1,12 @@ -import { GeistSans } from 'geist/font/sans'; -import { GeistMono } from 'geist/font/mono'; -import { Toaster } from 'sonner'; -import { Analytics } from '@vercel/analytics/react'; import { Navbar } from '@/components/navbar'; import { siteUrl } from '@/lib/consts'; import { cn } from '@/lib/utils'; +import { Analytics } from '@vercel/analytics/react'; +import { GeistMono } from 'geist/font/mono'; +import { GeistSans } from 'geist/font/sans'; import type { Metadata } from 'next'; import type { FC, ReactNode } from 'react'; +import { Toaster } from 'sonner'; import './globals.css'; type RootLayoutProperties = { diff --git a/components/form.tsx b/components/form.tsx index 3d514841..f2580a1f 100644 --- a/components/form.tsx +++ b/components/form.tsx @@ -1,9 +1,9 @@ -import { useId, useState } from 'react'; +import { cn } from '@/lib/utils'; import * as RadixLabel from '@radix-ui/react-label'; +import type { LabelProps } from '@radix-ui/react-label'; import * as RadixSelect from '@radix-ui/react-select'; import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'; -import { cn } from '@/lib/utils'; -import type { LabelProps } from '@radix-ui/react-label'; +import { useId, useState } from 'react'; import type { ChangeEventHandler, ComponentProps, FC } from 'react'; type CustomProperties = { diff --git a/components/navbar.tsx b/components/navbar.tsx index 47d8e607..7c88179e 100644 --- a/components/navbar.tsx +++ b/components/navbar.tsx @@ -1,6 +1,6 @@ 'use client'; -import { usePathname } from 'next/navigation'; +import { cn } from '@/lib/utils'; import { BriefcaseBusinessIcon, CircleUserIcon, @@ -10,9 +10,9 @@ import { NewspaperIcon, NotebookPenIcon, } from 'lucide-react'; -import { cn } from '@/lib/utils'; -import { Link } from './link'; +import { usePathname } from 'next/navigation'; import type { FC } from 'react'; +import { Link } from './link'; const pages = [ { name: 'Home', path: '/', icon: HomeIcon }, diff --git a/components/video.tsx b/components/video.tsx index 2e9248bf..9cdeb7f1 100644 --- a/components/video.tsx +++ b/components/video.tsx @@ -1,7 +1,7 @@ 'use client'; -import dynamic from 'next/dynamic'; import { cn } from '@/lib/utils'; +import dynamic from 'next/dynamic'; import type { FC } from 'react'; import type { ReactPlayerProps } from 'react-player'; diff --git a/contentlayer.config.ts b/contentlayer.config.ts index 4952ffc8..01c2d2d2 100644 --- a/contentlayer.config.ts +++ b/contentlayer.config.ts @@ -1,17 +1,17 @@ import { defineDocumentType, makeSource } from 'contentlayer2/source-files'; -import remarkGfm from 'remark-gfm'; -import rehypePrettyCode from 'rehype-pretty-code'; -import rehypeSlug from 'rehype-slug'; -import rehypeAutolinkHeadings from 'rehype-autolink-headings'; -import { rehypeAccessibleEmojis } from 'rehype-accessible-emojis'; +import type { ComputedFields } from 'contentlayer2/source-files'; +import { extractTocHeadings } from 'pliny/mdx-plugins/remark-toc-headings.js'; import readingTime from 'reading-time'; +import { rehypeAccessibleEmojis } from 'rehype-accessible-emojis'; +import rehypeAutolinkHeadings from 'rehype-autolink-headings'; +import type { Options as RehypeAutoLinkHeadingsOptions } from 'rehype-autolink-headings'; import rehypePresetMinify from 'rehype-preset-minify'; -import { extractTocHeadings } from 'pliny/mdx-plugins/remark-toc-headings.js'; +import rehypePrettyCode from 'rehype-pretty-code'; +import type { Options as PrettyCodeOptions } from 'rehype-pretty-code'; +import rehypeSlug from 'rehype-slug'; +import remarkGfm from 'remark-gfm'; import { sqip } from 'sqip'; import moonlightTheme from './public/moonlight-ii.json' with { type: 'json' }; -import type { Options as PrettyCodeOptions } from 'rehype-pretty-code'; -import type { Options as RehypeAutoLinkHeadingsOptions } from 'rehype-autolink-headings'; -import type { ComputedFields } from 'contentlayer2/source-files'; export const computeFields = ({ openGraphEndpoint = '/api/og', diff --git a/lib/utils.ts b/lib/utils.ts index 61726bd5..2a2bb857 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -1,6 +1,6 @@ import { clsx } from 'clsx'; -import { twMerge } from 'tailwind-merge'; import type { ClassValue } from 'clsx'; +import { twMerge } from 'tailwind-merge'; export const cn = (...inputs: ClassValue[]): string => twMerge(clsx(inputs)); diff --git a/tsconfig.json b/tsconfig.json index e6a20ab8..94df8194 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,6 @@ { "compilerOptions": { - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], + "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, @@ -22,24 +18,13 @@ } ], "paths": { - "@contentlayer/generated": [ - "./.contentlayer/generated" - ], - "@/*": [ - "./*" - ] + "@contentlayer/generated": ["./.contentlayer/generated"], + "@/*": ["./*"] }, "strictNullChecks": true, "baseUrl": ".", "target": "ES2017" }, - "include": [ - "next-env.d.ts", - "**/*.ts", - "**/*.tsx", - ".next/types/**/*.ts" - ], - "exclude": [ - "node_modules" - ] + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] }