From a77c141d35bfe0c84ba2a91a5afe2c32ee4ab30e Mon Sep 17 00:00:00 2001 From: Shintaro Jokagi Date: Wed, 28 May 2025 13:50:37 +1200 Subject: [PATCH] chore(prettier): update prettier config --- prettier.config.js | 2 +- src/animations.ts | 4 +- src/components/BackButton.astro | 4 +- src/components/Button.astro | 22 ++-- src/components/Circles.astro | 6 +- src/components/Community.astro | 20 +-- src/components/Features.astro | 50 ++++---- src/components/Footer.astro | 24 ++-- src/components/Hero.astro | 24 ++-- src/components/MobileMenu.astro | 14 +- src/components/ModsList.tsx | 34 ++--- src/components/NavBar.astro | 32 ++--- src/components/ReleaseNoteItem.astro | 66 +++++----- src/components/ReleaseNoteListItem.astro | 18 +-- src/components/SocialMediaStrip.astro | 14 +- src/components/Sponsors.astro | 18 +-- src/components/ThemeSwitch.astro | 28 ++-- src/components/Title.astro | 4 +- src/components/Video.astro | 12 +- src/components/download/ButtonCard.astro | 20 +-- src/components/download/DownloadScript.astro | 58 ++++----- .../download/PlatformDownload.astro | 32 ++--- src/components/download/release-data.ts | 34 ++--- src/constants/checksum.ts | 10 +- src/constants/i18n.ts | 4 +- src/constants/index.ts | 4 +- src/hooks/useModsSearch.ts | 64 +++++----- src/icons/ArrowLeftIcon.astro | 2 +- src/icons/ArrowRightIcon.astro | 2 +- src/icons/ArrowUp.astro | 2 +- src/icons/CheckIcon.astro | 2 +- src/icons/ChevronDownIcon.astro | 2 +- src/icons/DownloadIcon.astro | 2 +- src/icons/ExternalLink.astro | 2 +- src/icons/GitHubIcon.astro | 2 +- src/icons/InfoIcon.astro | 2 +- src/icons/LockIcon.astro | 2 +- src/icons/MenuIcon.astro | 2 +- src/layouts/Layout.astro | 60 ++++----- src/mods.ts | 6 +- src/pages/404.astro | 2 +- src/pages/[...locale]/404.astro | 14 +- src/pages/[...locale]/about.astro | 14 +- src/pages/[...locale]/donate.astro | 12 +- src/pages/[...locale]/download.astro | 32 ++--- src/pages/[...locale]/feed.xml.ts | 46 +++---- src/pages/[...locale]/index.astro | 14 +- src/pages/[...locale]/mods/[...slug].astro | 36 +++--- src/pages/[...locale]/mods/index.astro | 14 +- src/pages/[...locale]/privacy-policy.astro | 8 +- .../[...locale]/release-notes/[...slug].astro | 10 +- .../[...locale]/release-notes/index.astro | 62 ++++----- src/pages/[...locale]/welcome.astro | 8 +- src/pages/[...locale]/whatsnew.astro | 30 ++--- src/release-notes.ts | 6 +- src/tests/components/Button.test.ts | 88 ++++++------- src/tests/components/ButtonCard.test.ts | 44 +++---- src/tests/components/PlatformDownload.test.ts | 120 +++++++++--------- src/tests/components/release-data.test.ts | 32 ++--- src/tests/pages/download.spec.ts | 60 ++++----- src/tests/pages/mods.spec.ts | 10 +- src/tests/pages/routes.spec.ts | 6 +- src/tests/vitest.setup.ts | 8 +- src/utils/githubChecksums.ts | 12 +- src/utils/i18n.ts | 16 +-- src/utils/merge.ts | 4 +- 66 files changed, 709 insertions(+), 709 deletions(-) diff --git a/prettier.config.js b/prettier.config.js index d68bdf5..b945f52 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -7,7 +7,7 @@ export default { tabWidth: 2, useTabs: false, semi: false, - singleQuote: false, + singleQuote: true, quoteProps: "as-needed", trailingComma: "es5", bracketSpacing: true, diff --git a/src/animations.ts b/src/animations.ts index 3b7e6e7..53b367d 100644 --- a/src/animations.ts +++ b/src/animations.ts @@ -1,10 +1,10 @@ export function getTitleAnimation(delay = 0, duration = 0.3, once = true) { return { - initial: { opacity: 0.001, translateY: 20, filter: "blur(4px)" }, + initial: { opacity: 0.001, translateY: 20, filter: 'blur(4px)' }, whileInView: { opacity: 1, translateY: 0, - filter: "blur(0px)", + filter: 'blur(0px)', transition: { duration, delay }, }, viewport: { once }, diff --git a/src/components/BackButton.astro b/src/components/BackButton.astro index 6cac771..f442462 100644 --- a/src/components/BackButton.astro +++ b/src/components/BackButton.astro @@ -1,6 +1,6 @@ --- -import ArrowLeftIcon from "~/icons/ArrowLeftIcon.astro" -import { getLocale, getUI } from "~/utils/i18n" +import ArrowLeftIcon from '~/icons/ArrowLeftIcon.astro' +import { getLocale, getUI } from '~/utils/i18n' const locale = getLocale(Astro) diff --git a/src/components/Button.astro b/src/components/Button.astro index 30fb9d8..e2266ed 100644 --- a/src/components/Button.astro +++ b/src/components/Button.astro @@ -1,5 +1,5 @@ --- -import { getLocale, getPath } from "~/utils/i18n" +import { getLocale, getPath } from '~/utils/i18n' const locale = getLocale(Astro) const getLocalePath = getPath(locale) @@ -13,15 +13,15 @@ const { class: className, isPrimary, isAlert, isBordered, href, id, extra } = As {...extra} href={getLocalePath(href)} class:list={[ - "transition-bg flex items-center justify-center gap-2 rounded-xl px-6 py-4 transition-transform duration-150 hover:scale-[1.02] active:scale-[0.98]", + 'transition-bg flex items-center justify-center gap-2 rounded-xl px-6 py-4 transition-transform duration-150 hover:scale-[1.02] active:scale-[0.98]', className, isPrimary - ? "border-dark bg-dark text-paper shadow-lg" + ? 'border-dark bg-dark text-paper shadow-lg' : isAlert - ? "bg-red-300 text-dark" + ? 'bg-red-300 text-dark' : !isBordered - ? "bg-subtle" - : "!transition-bg border-2 border-dark hover:bg-dark hover:text-paper hover:shadow-sm", + ? 'bg-subtle' + : '!transition-bg border-2 border-dark hover:bg-dark hover:text-paper hover:shadow-sm', ]} > @@ -31,15 +31,15 @@ const { class: className, isPrimary, isAlert, isBordered, href, id, extra } = As id={id} {...extra} class:list={[ - "transition-bg flex items-center justify-center gap-2 rounded-lg px-6 py-3 transition-transform duration-150 hover:scale-[1.02]", + 'transition-bg flex items-center justify-center gap-2 rounded-lg px-6 py-3 transition-transform duration-150 hover:scale-[1.02]', className, isPrimary - ? "border-dark bg-dark text-paper shadow-md" + ? 'border-dark bg-dark text-paper shadow-md' : isAlert - ? "bg-red-300 text-dark" + ? 'bg-red-300 text-dark' : !isBordered - ? "" - : "!transition-bg border-2 border-dark hover:bg-dark hover:text-paper hover:shadow-sm", + ? '' + : '!transition-bg border-2 border-dark hover:bg-dark hover:text-paper hover:shadow-sm', ]} > diff --git a/src/components/Circles.astro b/src/components/Circles.astro index de6ed97..8d17197 100644 --- a/src/components/Circles.astro +++ b/src/components/Circles.astro @@ -4,14 +4,14 @@ const sizes = [216, 396, 576, 756] const borderWidths = [20, 30, 40, 50] --- -
+
{ [...Array(4)].map((_, i) => (
- diff --git a/src/components/Features.astro b/src/components/Features.astro index 70f7d2e..fb753d8 100644 --- a/src/components/Features.astro +++ b/src/components/Features.astro @@ -1,15 +1,15 @@ --- -import { motion } from "motion/react" -import { getTitleAnimation } from "~/animations" -import Description from "~/components/Description.astro" +import { motion } from 'motion/react' +import { getTitleAnimation } from '~/animations' +import Description from '~/components/Description.astro' -import CompactModeVideo from "~/assets/CompactMode.webm" -import GlanceVideo from "~/assets/Glance.webm" -import SplitViewsVideo from "~/assets/SplitViews.webm" -import WorkspacesVideo from "~/assets/Workspaces.webm" +import CompactModeVideo from '~/assets/CompactMode.webm' +import GlanceVideo from '~/assets/Glance.webm' +import SplitViewsVideo from '~/assets/SplitViews.webm' +import WorkspacesVideo from '~/assets/Workspaces.webm' -import { getLocale, getUI } from "~/utils/i18n" -import Video from "./Video.astro" +import { getLocale, getUI } from '~/utils/i18n' +import Video from './Video.astro' const locale = getLocale(Astro) @@ -161,17 +161,17 @@ const descriptions = Object.values(features.featureTabs).map(tab => tab.descript diff --git a/src/components/Title.astro b/src/components/Title.astro index dc5664f..b9e7983 100644 --- a/src/components/Title.astro +++ b/src/components/Title.astro @@ -1,10 +1,10 @@ --- -import { cn } from "~/utils/merge" +import { cn } from '~/utils/merge' const { class: className } = Astro.props ---

diff --git a/src/components/Video.astro b/src/components/Video.astro index cc2c081..428157e 100644 --- a/src/components/Video.astro +++ b/src/components/Video.astro @@ -1,22 +1,22 @@ --- const { src, class: className, ...rest } = Astro.props -const type = src.split(".").pop() || "webm" +const type = src.split('.').pop() || 'webm' --- {/* eslint-disable-next-line jsx-a11y/media-has-caption */} -