feat(lint): add biome formatter and linter, husky and lint-staged

This commit adds the Biome formatter and linter to replace Prettier, including:

- Add biome.json config file
- Add pre-commit hook with Husky
- Configure GitHub Action to run Biome checks
- Apply Biome formatting rules to codebase
- Remove Prettier dependencies
This commit is contained in:
Shintaro Jokagi 2025-05-15 13:52:37 +12:00
parent b4e5fe2bea
commit bcb1427a79
No known key found for this signature in database
GPG key ID: 0DDF8FA44C9A0DA8
50 changed files with 904 additions and 793 deletions

View file

@ -1,32 +1,29 @@
---
import { ArrowRight } from 'lucide-astro'
import Button from '~/components/Button.astro'
import Description from '~/components/Description.astro'
import SocialMediaStrip from '~/components/SocialMediaStrip.astro'
import Layout from '~/layouts/Layout.astro'
import { ArrowRight } from "lucide-astro";
import Button from "~/components/Button.astro";
import Description from "~/components/Description.astro";
import SocialMediaStrip from "~/components/SocialMediaStrip.astro";
import Layout from "~/layouts/Layout.astro";
import whatsNewVideo from '~/assets/whats-new.mp4'
import Video from '~/components/Video.astro'
import { releaseNotes } from '~/release-notes'
import whatsNewText from '~/release-notes/whats-new.json'
import { getLocale, getUI } from '~/utils/i18n'
export { getStaticPaths } from '~/utils/i18n'
import whatsNewVideo from "~/assets/whats-new.mp4";
import Video from "~/components/Video.astro";
import { releaseNotes } from "~/release-notes";
import whatsNewText from "~/release-notes/whats-new.json";
import { getLocale, getUI } from "~/utils/i18n";
export { getStaticPaths } from "~/utils/i18n";
const latestVersion = releaseNotes[0]
const latestVersion = releaseNotes[0];
const locale = getLocale(Astro)
const locale = getLocale(Astro);
const {
routes: { whatsNew },
layout,
} = getUI(locale)
} = getUI(locale);
// Just redirect to the release notes if we are in a patch version
if (
latestVersion.version.split('.').length > 2 &&
whatsNewText[1] !== latestVersion.version
) {
return Astro.redirect(`/release-notes#${latestVersion.version}`)
if (latestVersion.version.split(".").length > 2 && whatsNewText[1] !== latestVersion.version) {
return Astro.redirect(`/release-notes#${latestVersion.version}`);
}
---