From 2728d9c113e3ee2e70a6f8c19d10cfec11beb89e Mon Sep 17 00:00:00 2001 From: incognitotgt Date: Mon, 24 Jun 2024 12:26:39 -0400 Subject: [PATCH] V6.0.0 - Run precommit step, add biome CI --- .github/workflows/biome.yaml | 5 +++++ package.json | 2 +- src/layouts/Main.astro | 2 +- src/lib/asset-script.ts | 2 +- src/pages/ap.astro | 2 +- src/pages/ga.astro | 2 +- src/pages/to.astro | 2 +- tsconfig.json | 2 +- 8 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/biome.yaml diff --git a/.github/workflows/biome.yaml b/.github/workflows/biome.yaml new file mode 100644 index 0000000..cd3fa51 --- /dev/null +++ b/.github/workflows/biome.yaml @@ -0,0 +1,5 @@ +- name: Setup Biome CLI + uses: biomejs/setup-biome@v2 + +- name: Run Biome + run: biome ci . diff --git a/package.json b/package.json index 0c37018..e6ad8d8 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "preview": "astro preview", "typecheck": "astro check", "astro": "astro", - "precommit": "pnpm lint && pnpm format && pnpm typecheck", + "precommit": "pnpm lint && pnpm format && biome check --write . && pnpm typecheck", "lint": "biome lint --write .", "format": "prettier --write . && biome format --write ." }, diff --git a/src/layouts/Main.astro b/src/layouts/Main.astro index bacd4d5..4229ac7 100644 --- a/src/layouts/Main.astro +++ b/src/layouts/Main.astro @@ -1,6 +1,6 @@ --- -import { AppWindow, Gamepad2, LayoutGrid, Settings2, Wrench } from "lucide-astro"; import Obfuscated from "@/components/Obfuscated.astro"; +import { AppWindow, Gamepad2, LayoutGrid, Settings2, Wrench } from "lucide-astro"; import Layout from "./Layout.astro"; const navLinks = [ { href: "/ap", text: "Apps", Icon: LayoutGrid }, diff --git a/src/lib/asset-script.ts b/src/lib/asset-script.ts index c7b817f..f6ba009 100644 --- a/src/lib/asset-script.ts +++ b/src/lib/asset-script.ts @@ -5,7 +5,7 @@ document.addEventListener("astro:page-load", () => { ) as NodeListOf; for (const button of buttons) { button.addEventListener("click", () => { - const asset: Asset = JSON.parse(button.dataset.asset!); + const asset: Asset = JSON.parse(button.dataset.asset as string); if (asset.say) alert(asset.say); if (asset.link) { sessionStorage.setItem("goUrl", asset.link); diff --git a/src/pages/ap.astro b/src/pages/ap.astro index 223743a..411ed42 100644 --- a/src/pages/ap.astro +++ b/src/pages/ap.astro @@ -1,9 +1,9 @@ --- import { Image } from "astro:assets"; -import { LayoutGrid } from "lucide-astro"; import Obfuscated from "@/components/Obfuscated.astro"; import Layout from "@/layouts/Main.astro"; import { ASSET_URL, type Asset } from "@/lib/asset"; +import { LayoutGrid } from "lucide-astro"; const apps: Asset[] = await (await fetch(`${ASSET_URL}/json/apps.json`)).json(); --- diff --git a/src/pages/ga.astro b/src/pages/ga.astro index 2df2d47..051b1c8 100644 --- a/src/pages/ga.astro +++ b/src/pages/ga.astro @@ -1,9 +1,9 @@ --- import { Image } from "astro:assets"; -import { Gamepad2 } from "lucide-astro"; import Obfuscated from "@/components/Obfuscated.astro"; import Layout from "@/layouts/Main.astro"; import { ASSET_URL, type Asset } from "@/lib/asset"; +import { Gamepad2 } from "lucide-astro"; const games: Asset[] = await (await fetch(`${ASSET_URL}/json/games.json`)).json(); --- diff --git a/src/pages/to.astro b/src/pages/to.astro index a15eb89..39646e5 100644 --- a/src/pages/to.astro +++ b/src/pages/to.astro @@ -1,9 +1,9 @@ --- import { Image } from "astro:assets"; -import { Wrench } from "lucide-astro"; import Obfuscated from "@/components/Obfuscated.astro"; import Layout from "@/layouts/Main.astro"; import { ASSET_URL, type Asset } from "@/lib/asset"; +import { Wrench } from "lucide-astro"; const tools: Asset[] = await (await fetch(`${ASSET_URL}/json/tools.json`)).json(); --- diff --git a/tsconfig.json b/tsconfig.json index a89441d..38c1a82 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ "baseUrl": ".", "paths": { "@/*": ["src/*"] - }, + } }, "exclude": ["node_modules", "dist", "public/assets/bundled/**"] }