From 10ce0f65c97901b099ab6413ef7d55b85bbbb2ed Mon Sep 17 00:00:00 2001 From: Oliver Bryan <04oliverbryan@gmail.com> Date: Wed, 14 Jan 2026 23:17:45 +0000 Subject: [PATCH] biome setup --- .vscode/extensions.json | 4 +- .vscode/launch.json | 18 ++-- astro.config.mjs | 23 +++-- biome.json | 54 +++++++++++ package.json | 50 +++++----- public/fonts/CommitMono/custom-settings.json | 21 ++++- src/components/AIPrompt.astro | 6 +- src/components/CommandPalette.astro | 24 ++--- src/layouts/Layout.astro | 1 + src/pages/font.astro | 3 +- src/pages/index.astro | 98 ++++++++++---------- src/pages/projects/factor-e.astro | 2 +- src/pages/projects/flackie.astro | 12 +-- src/pages/projects/glimpse.astro | 12 +-- src/pages/projects/good-morning.astro | 33 +++---- src/pages/projects/issue.astro | 31 +++---- src/pages/projects/mizu.astro | 14 +-- src/pages/projects/prayerbud.astro | 2 +- src/pages/projects/shleep.astro | 5 +- src/pages/projects/watercooler.astro | 16 +--- src/pages/projects/wiskatron.astro | 2 +- src/styles/global.css | 7 +- tsconfig.json | 21 ++--- 23 files changed, 233 insertions(+), 226 deletions(-) create mode 100644 biome.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 22a15055..2592970b 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,4 +1,4 @@ { - "recommendations": ["astro-build.astro-vscode"], - "unwantedRecommendations": [] + "recommendations": ["astro-build.astro-vscode"], + "unwantedRecommendations": [] } diff --git a/.vscode/launch.json b/.vscode/launch.json index d6422097..e368c540 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,11 +1,11 @@ { - "version": "0.2.0", - "configurations": [ - { - "command": "./node_modules/.bin/astro dev", - "name": "Development server", - "request": "launch", - "type": "node-terminal" - } - ] + "version": "0.2.0", + "configurations": [ + { + "command": "./node_modules/.bin/astro dev", + "name": "Development server", + "request": "launch", + "type": "node-terminal" + } + ] } diff --git a/astro.config.mjs b/astro.config.mjs index f4589971..53aee668 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,20 +1,19 @@ // @ts-check -import { defineConfig } from 'astro/config'; -import vercel from '@astrojs/vercel'; +import react from "@astrojs/react"; -import react from '@astrojs/react'; +import vercel from "@astrojs/vercel"; +import tailwindcss from "@tailwindcss/vite"; +import { defineConfig } from "astro/config"; -import tailwindcss from '@tailwindcss/vite'; - -import icon from 'astro-icon'; +import icon from "astro-icon"; // https://astro.build/config export default defineConfig({ - adapter: vercel(), - integrations: [react(), icon()], + adapter: vercel(), + integrations: [react(), icon()], - vite: { - plugins: [tailwindcss()] - } -}); \ No newline at end of file + vite: { + plugins: [tailwindcss()], + }, +}); diff --git a/biome.json b/biome.json new file mode 100644 index 00000000..d80ad4f0 --- /dev/null +++ b/biome.json @@ -0,0 +1,54 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.3.11/schema.json", + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true + }, + "files": { + "includes": ["**", "!!**/dist"] + }, + "formatter": { + "enabled": true, + "formatWithErrors": false, + "indentStyle": "space", + "indentWidth": 4, + "lineWidth": 110 + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true + } + }, + "overrides": [ + { + "includes": ["**/*.svelte", "**/*.astro", "**/*.vue"], + "linter": { + "rules": { + "style": { + "useConst": "off", + "useImportType": "off" + }, + "correctness": { + "noUnusedVariables": "off", + "noUnusedImports": "off" + } + } + } + } + ], + "javascript": { + "formatter": { + "quoteStyle": "double" + } + }, + "assist": { + "enabled": true, + "actions": { + "source": { + "organizeImports": "on" + } + } + } +} diff --git a/package.json b/package.json index af23b3cd..3370930c 100644 --- a/package.json +++ b/package.json @@ -1,27 +1,27 @@ { - "name": "oliver-bryan-dev", - "type": "module", - "version": "0.0.1", - "scripts": { - "dev": "astro dev", - "build": "astro build", - "preview": "astro preview", - "astro": "astro" - }, - "dependencies": { - "@astrojs/check": "^0.9.4", - "@astrojs/react": "^4.3.0", - "@astrojs/vercel": "^8.2.7", - "@iconify-json/mdi": "^1.2.3", - "@iconify-json/simple-icons": "^1.2.66", - "@tailwindcss/vite": "^4.1.13", - "@types/react": "^19.1.12", - "@types/react-dom": "^19.1.9", - "astro": "^5.13.5", - "astro-icon": "^1.1.5", - "react": "^19.1.1", - "react-dom": "^19.1.1", - "tailwindcss": "^4.1.13", - "typescript": "^5.9.2" - } + "name": "oliver-bryan-dev", + "type": "module", + "version": "0.0.1", + "scripts": { + "dev": "astro dev", + "build": "astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "@astrojs/check": "^0.9.4", + "@astrojs/react": "^4.3.0", + "@astrojs/vercel": "^8.2.7", + "@iconify-json/mdi": "^1.2.3", + "@iconify-json/simple-icons": "^1.2.66", + "@tailwindcss/vite": "^4.1.13", + "@types/react": "^19.1.12", + "@types/react-dom": "^19.1.9", + "astro": "^5.13.5", + "astro-icon": "^1.1.5", + "react": "^19.1.1", + "react-dom": "^19.1.1", + "tailwindcss": "^4.1.13", + "typescript": "^5.9.2" + } } diff --git a/public/fonts/CommitMono/custom-settings.json b/public/fonts/CommitMono/custom-settings.json index a988bcb7..a53c0145 100644 --- a/public/fonts/CommitMono/custom-settings.json +++ b/public/fonts/CommitMono/custom-settings.json @@ -1 +1,20 @@ -{"weight":200,"italic":false,"alternates":{"cv01":false,"cv02":false,"cv03":false,"cv04":false,"cv05":true,"cv06":false,"cv07":false,"cv08":false,"cv09":false,"cv10":false,"cv11":false},"features":{"ss01":false,"ss02":false,"ss03":true,"ss04":true,"ss05":true},"letterSpacing":0,"lineHeight":1} \ No newline at end of file +{ + "weight": 200, + "italic": false, + "alternates": { + "cv01": false, + "cv02": false, + "cv03": false, + "cv04": false, + "cv05": true, + "cv06": false, + "cv07": false, + "cv08": false, + "cv09": false, + "cv10": false, + "cv11": false + }, + "features": { "ss01": false, "ss02": false, "ss03": true, "ss04": true, "ss05": true }, + "letterSpacing": 0, + "lineHeight": 1 +} diff --git a/src/components/AIPrompt.astro b/src/components/AIPrompt.astro index 604742e7..4b1d4a87 100644 --- a/src/components/AIPrompt.astro +++ b/src/components/AIPrompt.astro @@ -3,9 +3,9 @@ import { Icon } from "astro-icon/components"; import { AI_SUMMARY_PROMPT } from "../lib/constants"; interface Props { - url: string; // anything that precedes the prompt: e.g. "https://ai.example.com/?prompt=" - title: string; - icon: string; + url: string; // anything that precedes the prompt: e.g. "https://ai.example.com/?prompt=" + title: string; + icon: string; } const { url, title, icon } = Astro.props; diff --git a/src/components/CommandPalette.astro b/src/components/CommandPalette.astro index 07b70d39..e5c35881 100644 --- a/src/components/CommandPalette.astro +++ b/src/components/CommandPalette.astro @@ -2,7 +2,7 @@ import { Icon } from "astro-icon/components"; import type { AstroModule, ProjectMetadata } from "../pages/index.astro"; -interface Props {} +type Props = {}; const {} = Astro.props; @@ -17,17 +17,17 @@ options.push({ }); // add all individual projects to options -Object.values( - import.meta.glob("../pages/projects/*.astro", { eager: true }) -).forEach((module) => { - const metadata = module.metadata as ProjectMetadata; - if (metadata && !metadata.hidden) { - options.push({ - name: `${metadata.title}`, - location: `/projects/${metadata.slug}`, - }); - } -}); +Object.values(import.meta.glob("../pages/projects/*.astro", { eager: true })).forEach( + (module) => { + const metadata = module.metadata as ProjectMetadata; + if (metadata && !metadata.hidden) { + options.push({ + name: `${metadata.title}`, + location: `/projects/${metadata.slug}`, + }); + } + }, +); ---