diff --git a/.prettierrc.mjs b/.prettierrc.mjs deleted file mode 100644 index 40bc9c8..0000000 --- a/.prettierrc.mjs +++ /dev/null @@ -1,9 +0,0 @@ -/** @type {import('prettier').Config} */ -export default { - printWidth: 80, - tabWidth: 2, - semi: false, - singleQuote: true, - endOfLine: 'lf', - plugins: ['prettier-plugin-astro', 'prettier-plugin-tailwindcss'], -} diff --git a/biome.json b/biome.json index f9ce8ee..b76e4ff 100644 --- a/biome.json +++ b/biome.json @@ -21,5 +21,11 @@ ".git", "dist" ] + }, + "javascript": { + "formatter": { + "quoteStyle": "single", + "semicolons": "asNeeded" + } } } diff --git a/src/animations.ts b/src/animations.ts index 0e11de6..bedae27 100644 --- a/src/animations.ts +++ b/src/animations.ts @@ -1,19 +1,19 @@ 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: once }, - }; + } } export function getZoomInAnimation(delay = 0) { return { initial: { scale: 0.8, opacity: 0.001 }, whileInView: { scale: 1, opacity: 1, transition: { duration: 0.2, delay } }, - }; + } } diff --git a/src/components/BackButton.astro b/src/components/BackButton.astro index c0074d5..2397d41 100644 --- a/src/components/BackButton.astro +++ b/src/components/BackButton.astro @@ -1,14 +1,14 @@ --- -import { ArrowLeft } from "lucide-astro"; -import { getLocale, getUI } from "~/utils/i18n"; +import { ArrowLeft } from 'lucide-astro' +import { getLocale, getUI } from '~/utils/i18n' -const locale = getLocale(Astro); +const locale = getLocale(Astro) const { routes: { mods: { slug }, }, -} = getUI(locale); +} = getUI(locale) ---
- {mods.pagination.pagination.split("{input}").map((value, index) => { + {mods.pagination.pagination.split('{input}').map((value, index) => { if (index === 0) { return ( - ); + ) } return ( {value - .replace("{totalPages}", totalPages.toString()) - .replace("{totalItems}", totalItems.toString())} + .replace('{totalPages}', totalPages.toString()) + .replace('{totalItems}', totalItems.toString())} - ); + ) })}
- ); + ) } return ( @@ -234,5 +234,5 @@ export default function ModsList({ allMods, locale }: ModsListProps) { {renderPagination()} - ); + ) } diff --git a/src/components/NavBar.astro b/src/components/NavBar.astro index 9f3ab98..bb39314 100644 --- a/src/components/NavBar.astro +++ b/src/components/NavBar.astro @@ -1,21 +1,21 @@ --- -import { Astronav, Dropdown, DropdownItems, MenuItems } from "astro-navbar"; -import { ArrowRight, ChevronDown, Download, Menu } from "lucide-astro"; -import { motion } from "motion/react"; -import Button from "~/components/Button.astro"; -import { getLocale, getPath, getUI } from "~/utils/i18n"; -import { getTitleAnimation } from "../animations.ts"; -import Logo from "./Logo.astro"; -import MobileMenu from "./MobileMenu.astro"; -import ThemeSwitch from "./ThemeSwitch.astro"; +import { Astronav, Dropdown, DropdownItems, MenuItems } from 'astro-navbar' +import { ArrowRight, ChevronDown, Download, Menu } from 'lucide-astro' +import { motion } from 'motion/react' +import Button from '~/components/Button.astro' +import { getLocale, getPath, getUI } from '~/utils/i18n' +import { getTitleAnimation } from '../animations.ts' +import Logo from './Logo.astro' +import MobileMenu from './MobileMenu.astro' +import ThemeSwitch from './ThemeSwitch.astro' -const locale = getLocale(Astro); -const getLocalePath = getPath(locale); +const locale = getLocale(Astro) +const getLocalePath = getPath(locale) const { components: { nav: { brand, menu }, }, -} = getUI(locale); +} = getUI(locale) --- diff --git a/src/components/ReleaseNoteItem.astro b/src/components/ReleaseNoteItem.astro index eeae398..b88951e 100644 --- a/src/components/ReleaseNoteItem.astro +++ b/src/components/ReleaseNoteItem.astro @@ -1,41 +1,41 @@ --- -import { Accordion, AccordionItem } from "free-astro-components"; -import { Info } from "lucide-astro"; +import { Accordion, AccordionItem } from 'free-astro-components' +import { Info } from 'lucide-astro' -import { releaseNotes as releaseNotesData } from "~/release-notes"; -import { getLocale, getPath, getUI } from "~/utils/i18n"; +import { releaseNotes as releaseNotesData } from '~/release-notes' +import { getLocale, getPath, getUI } from '~/utils/i18n' import { type BreakingChange, type ReleaseNote, getReleaseNoteFirefoxVersion, -} from "../release-notes"; -export type Props = ReleaseNote; -const { isTwilight, ...props } = Astro.props; +} from '../release-notes' +export type Props = ReleaseNote +const { isTwilight, ...props } = Astro.props -const locale = getLocale(Astro); -const getLocalePath = getPath(locale); +const locale = getLocale(Astro) +const getLocalePath = getPath(locale) const { routes: { releaseNotes: { components: { releaseNoteItem }, }, }, -} = getUI(locale); +} = getUI(locale) -let date: Date | undefined; +let date: Date | undefined if (props.date) { - const [day, month, year] = props.date.split("/"); - date = new Date(Date.parse(`${year}-${month}-${day}`)); + const [day, month, year] = props.date.split('/') + date = new Date(Date.parse(`${year}-${month}-${day}`)) } -const ffVersion = getReleaseNoteFirefoxVersion(props); +const ffVersion = getReleaseNoteFirefoxVersion(props) const currentReleaseIndex = releaseNotesData.findIndex( (releaseNote: ReleaseNote) => releaseNote.version === props.version, -); -const prevReleaseNote = releaseNotesData[currentReleaseIndex + 1]; -let compareLink = ""; +) +const prevReleaseNote = releaseNotesData[currentReleaseIndex + 1] +let compareLink = '' if (prevReleaseNote && !isTwilight) { - compareLink = `https://github.com/zen-browser/desktop/compare/${prevReleaseNote.version}...${props.version}`; + compareLink = `https://github.com/zen-browser/desktop/compare/${prevReleaseNote.version}...${props.version}` } --- diff --git a/src/components/SocialMediaStrip.astro b/src/components/SocialMediaStrip.astro index ad1238e..ed22a5b 100644 --- a/src/components/SocialMediaStrip.astro +++ b/src/components/SocialMediaStrip.astro @@ -1,21 +1,21 @@ --- -const { gap = 4 } = Astro.props; +const { gap = 4 } = Astro.props -import { icon, library } from "@fortawesome/fontawesome-svg-core"; +import { icon, library } from '@fortawesome/fontawesome-svg-core' import { faBluesky, faGithub, faMastodon, faReddit, faXTwitter, -} from "@fortawesome/free-brands-svg-icons"; +} from '@fortawesome/free-brands-svg-icons' -library.add(faMastodon, faBluesky, faGithub, faXTwitter, faReddit); -const Mastodon = icon({ prefix: "fab", iconName: "mastodon" }); -const Bluesky = icon({ prefix: "fab", iconName: "bluesky" }); -const Github = icon({ prefix: "fab", iconName: "github" }); -const XTwitter = icon({ prefix: "fab", iconName: "x-twitter" }); -const Reddit = icon({ prefix: "fab", iconName: "reddit" }); +library.add(faMastodon, faBluesky, faGithub, faXTwitter, faReddit) +const Mastodon = icon({ prefix: 'fab', iconName: 'mastodon' }) +const Bluesky = icon({ prefix: 'fab', iconName: 'bluesky' }) +const Github = icon({ prefix: 'fab', iconName: 'github' }) +const XTwitter = icon({ prefix: 'fab', iconName: 'x-twitter' }) +const Reddit = icon({ prefix: 'fab', iconName: 'reddit' }) ---