biome setup

This commit is contained in:
Oliver Bryan
2026-01-14 23:17:45 +00:00
parent 9b699d48be
commit 10ce0f65c9
23 changed files with 233 additions and 226 deletions

View File

@@ -1,4 +1,4 @@
{ {
"recommendations": ["astro-build.astro-vscode"], "recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": [] "unwantedRecommendations": []
} }

18
.vscode/launch.json vendored
View File

@@ -1,11 +1,11 @@
{ {
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"command": "./node_modules/.bin/astro dev", "command": "./node_modules/.bin/astro dev",
"name": "Development server", "name": "Development server",
"request": "launch", "request": "launch",
"type": "node-terminal" "type": "node-terminal"
} }
] ]
} }

View File

@@ -1,20 +1,19 @@
// @ts-check // @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 // https://astro.build/config
export default defineConfig({ export default defineConfig({
adapter: vercel(), adapter: vercel(),
integrations: [react(), icon()], integrations: [react(), icon()],
vite: { vite: {
plugins: [tailwindcss()] plugins: [tailwindcss()],
} },
}); });

54
biome.json Normal file
View File

@@ -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"
}
}
}
}

View File

@@ -1,27 +1,27 @@
{ {
"name": "oliver-bryan-dev", "name": "oliver-bryan-dev",
"type": "module", "type": "module",
"version": "0.0.1", "version": "0.0.1",
"scripts": { "scripts": {
"dev": "astro dev", "dev": "astro dev",
"build": "astro build", "build": "astro build",
"preview": "astro preview", "preview": "astro preview",
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"@astrojs/check": "^0.9.4", "@astrojs/check": "^0.9.4",
"@astrojs/react": "^4.3.0", "@astrojs/react": "^4.3.0",
"@astrojs/vercel": "^8.2.7", "@astrojs/vercel": "^8.2.7",
"@iconify-json/mdi": "^1.2.3", "@iconify-json/mdi": "^1.2.3",
"@iconify-json/simple-icons": "^1.2.66", "@iconify-json/simple-icons": "^1.2.66",
"@tailwindcss/vite": "^4.1.13", "@tailwindcss/vite": "^4.1.13",
"@types/react": "^19.1.12", "@types/react": "^19.1.12",
"@types/react-dom": "^19.1.9", "@types/react-dom": "^19.1.9",
"astro": "^5.13.5", "astro": "^5.13.5",
"astro-icon": "^1.1.5", "astro-icon": "^1.1.5",
"react": "^19.1.1", "react": "^19.1.1",
"react-dom": "^19.1.1", "react-dom": "^19.1.1",
"tailwindcss": "^4.1.13", "tailwindcss": "^4.1.13",
"typescript": "^5.9.2" "typescript": "^5.9.2"
} }
} }

View File

@@ -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} {
"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
}

View File

@@ -3,9 +3,9 @@ import { Icon } from "astro-icon/components";
import { AI_SUMMARY_PROMPT } from "../lib/constants"; import { AI_SUMMARY_PROMPT } from "../lib/constants";
interface Props { interface Props {
url: string; // anything that precedes the prompt: e.g. "https://ai.example.com/?prompt=" url: string; // anything that precedes the prompt: e.g. "https://ai.example.com/?prompt="
title: string; title: string;
icon: string; icon: string;
} }
const { url, title, icon } = Astro.props; const { url, title, icon } = Astro.props;

View File

@@ -2,7 +2,7 @@
import { Icon } from "astro-icon/components"; import { Icon } from "astro-icon/components";
import type { AstroModule, ProjectMetadata } from "../pages/index.astro"; import type { AstroModule, ProjectMetadata } from "../pages/index.astro";
interface Props {} type Props = {};
const {} = Astro.props; const {} = Astro.props;
@@ -17,17 +17,17 @@ options.push({
}); });
// add all individual projects to options // add all individual projects to options
Object.values( Object.values(import.meta.glob<AstroModule>("../pages/projects/*.astro", { eager: true })).forEach(
import.meta.glob<AstroModule>("../pages/projects/*.astro", { eager: true }) (module) => {
).forEach((module) => { const metadata = module.metadata as ProjectMetadata;
const metadata = module.metadata as ProjectMetadata; if (metadata && !metadata.hidden) {
if (metadata && !metadata.hidden) { options.push({
options.push({ name: `${metadata.title}`,
name: `${metadata.title}`, location: `/projects/${metadata.slug}`,
location: `/projects/${metadata.slug}`, });
}); }
} },
}); );
--- ---
<script> <script>

View File

@@ -2,6 +2,7 @@
import "../styles/global.css"; import "../styles/global.css";
import CommandPalette from "../components/CommandPalette.astro"; import CommandPalette from "../components/CommandPalette.astro";
import Header from "../components/Header.astro"; import Header from "../components/Header.astro";
const { currentPage } = Astro.props; const { currentPage } = Astro.props;
--- ---

View File

@@ -2,8 +2,7 @@
import Layout from "../layouts/Layout.astro"; import Layout from "../layouts/Layout.astro";
const weights = [ const weights = [
200, 225, 250, 275, 300, 325, 350, 375, 400, 425, 450, 475, 500, 525, 550, 200, 225, 250, 275, 300, 325, 350, 375, 400, 425, 450, 475, 500, 525, 550, 575, 600, 625, 650, 675, 700,
575, 600, 625, 650, 675, 700,
]; ];
const sampleText = "The quick brown fox jumps over the lazy dog 0123456789."; const sampleText = "The quick brown fox jumps over the lazy dog 0123456789.";

View File

@@ -7,76 +7,76 @@ import Layout from "../layouts/Layout.astro";
import { AI_SUMMARY_PROMPT } from "../lib/constants"; import { AI_SUMMARY_PROMPT } from "../lib/constants";
export interface ProjectMetadata { export interface ProjectMetadata {
title: string; title: string;
description: string; description: string;
date: string; date: string;
slug: string; slug: string;
hidden: boolean; hidden: boolean;
image?: string; image?: string;
tags?: string[]; tags?: string[];
type: string; type: string;
} }
export interface AstroModule { export interface AstroModule {
metadata?: ProjectMetadata; metadata?: ProjectMetadata;
} }
function parseDate(dateStr: string): Date { function parseDate(dateStr: string): Date {
// formats like "February 2024", "January - June 2024", "Q1 2023", etc // formats like "February 2024", "January - June 2024", "Q1 2023", etc
const lower = dateStr.toLowerCase(); const lower = dateStr.toLowerCase();
if (lower.includes("q1")) return new Date("2023-01-01"); if (lower.includes("q1")) return new Date("2023-01-01");
if (lower.includes("q2")) return new Date("2023-04-01"); if (lower.includes("q2")) return new Date("2023-04-01");
if (lower.includes("q3")) return new Date("2023-07-01"); if (lower.includes("q3")) return new Date("2023-07-01");
if (lower.includes("q4")) return new Date("2023-10-01"); if (lower.includes("q4")) return new Date("2023-10-01");
const months: Record<string, number> = { const months: Record<string, number> = {
january: 0, january: 0,
february: 1, february: 1,
march: 2, march: 2,
april: 3, april: 3,
may: 4, may: 4,
june: 5, june: 5,
july: 6, july: 6,
august: 7, august: 7,
september: 8, september: 8,
october: 9, october: 9,
november: 10, november: 10,
december: 11, december: 11,
}; };
// month and year // month and year
for (const [monthName, monthIndex] of Object.entries(months)) { for (const [monthName, monthIndex] of Object.entries(months)) {
if (lower.includes(monthName)) { if (lower.includes(monthName)) {
const yearMatch = dateStr.match(/\b(20\d{2})\b/); const yearMatch = dateStr.match(/\b(20\d{2})\b/);
if (yearMatch) { if (yearMatch) {
return new Date(parseInt(yearMatch[1]), monthIndex, 1); return new Date(parseInt(yearMatch[1]), monthIndex, 1);
} }
}
} }
}
// fallback: try to extract any year // fallback: try to extract any year
const yearMatch = dateStr.match(/\b(20\d{2})\b/); const yearMatch = dateStr.match(/\b(20\d{2})\b/);
if (yearMatch) { if (yearMatch) {
return new Date(parseInt(yearMatch[1]), 0, 1); return new Date(parseInt(yearMatch[1]), 0, 1);
} }
return new Date(0); return new Date(0);
} }
const isDevMode = import.meta.env.PUBLIC_DEV === "1"; const isDevMode = import.meta.env.PUBLIC_DEV === "1";
const projects: ProjectMetadata[] = Object.values( const projects: ProjectMetadata[] = Object.values(
import.meta.glob<AstroModule>("./projects/*.astro", { eager: true }) import.meta.glob<AstroModule>("./projects/*.astro", { eager: true }),
) )
.map((module) => module.metadata) .map((module) => module.metadata)
.filter((metadata): metadata is ProjectMetadata => metadata !== undefined) .filter((metadata): metadata is ProjectMetadata => metadata !== undefined)
.filter((project) => !project.hidden || isDevMode) .filter((project) => !project.hidden || isDevMode)
.sort((a, b) => parseDate(b.date).getTime() - parseDate(a.date).getTime()); .sort((a, b) => parseDate(b.date).getTime() - parseDate(a.date).getTime());
const allTags = new Set<string>(); const allTags = new Set<string>();
projects.forEach((project) => { projects.forEach((project) => {
project.tags?.forEach((tag) => allTags.add(tag)); project.tags?.forEach((tag) => allTags.add(tag));
}); });
const sortedTags = Array.from(allTags).sort((a, b) => a.localeCompare(b)); const sortedTags = Array.from(allTags).sort((a, b) => a.localeCompare(b));

View File

@@ -1,6 +1,6 @@
--- ---
import ProjectPage from "../../components/ProjectPage.astro";
import Demo from "../../components/Demo.astro"; import Demo from "../../components/Demo.astro";
import ProjectPage from "../../components/ProjectPage.astro";
export const metadata = { export const metadata = {
title: "factor-e", title: "factor-e",

View File

@@ -1,6 +1,6 @@
--- ---
import ProjectPage from "../../components/ProjectPage.astro";
import Demo from "../../components/Demo.astro"; import Demo from "../../components/Demo.astro";
import ProjectPage from "../../components/ProjectPage.astro";
export const metadata = { export const metadata = {
title: "flackie", title: "flackie",
@@ -11,15 +11,7 @@ export const metadata = {
image: "/flackie-icon.svg", image: "/flackie-icon.svg",
github: "https://github.com/hex248/flackie", github: "https://github.com/hex248/flackie",
hidden: true, hidden: true,
tags: [ tags: ["Raspberry Pi", "Python", "C++", "CMake", "Electronics", "Pillow", "Image Generation"],
"Raspberry Pi",
"Python",
"C++",
"CMake",
"Electronics",
"Pillow",
"Image Generation",
],
type: "personal", type: "personal",
}; };
--- ---

View File

@@ -1,6 +1,6 @@
--- ---
import ProjectPage from "../../components/ProjectPage.astro";
import Demo from "../../components/Demo.astro"; import Demo from "../../components/Demo.astro";
import ProjectPage from "../../components/ProjectPage.astro";
export const metadata = { export const metadata = {
title: "glimpse", title: "glimpse",
@@ -11,15 +11,7 @@ export const metadata = {
url: "https://glimpse.ob248.com", url: "https://glimpse.ob248.com",
github: "https://github.com/hex248/glimpse", github: "https://github.com/hex248/glimpse",
hidden: false, hidden: false,
tags: [ tags: ["Web", "React", "TypeScript", "PostgreSQL", "Blob Storage", "Databases", "OAuth2"],
"Web",
"React",
"TypeScript",
"PostgreSQL",
"Blob Storage",
"Databases",
"OAuth2",
],
type: "personal", type: "personal",
}; };
--- ---

View File

@@ -1,29 +1,18 @@
--- ---
import ProjectPage from "../../components/ProjectPage.astro";
import Demo from "../../components/Demo.astro"; import Demo from "../../components/Demo.astro";
import ProjectPage from "../../components/ProjectPage.astro";
export const metadata = { export const metadata = {
title: "good morning!", title: "good morning!",
description: description: "An app for couples or friends to share daily notices with songs and photos",
"An app for couples or friends to share daily notices with songs and photos", date: "October 2025",
date: "October 2025", slug: "good-morning",
slug: "good-morning", image: "/good-morning-icon.png",
image: "/good-morning-icon.png", url: "https://gm.ob248.com",
url: "https://gm.ob248.com", github: "https://github.com/hex248/good-morning",
github: "https://github.com/hex248/good-morning", hidden: false,
hidden: false, tags: ["Web", "React", "TypeScript", "Go", "PostgreSQL", "AWS S3", "Databases", "OAuth2", "Spotify API"],
tags: [ type: "personal",
"Web",
"React",
"TypeScript",
"Go",
"PostgreSQL",
"AWS S3",
"Databases",
"OAuth2",
"Spotify API",
],
type: "personal",
}; };
--- ---

View File

@@ -1,27 +1,18 @@
--- ---
import ProjectPage from "../../components/ProjectPage.astro";
import Demo from "../../components/Demo.astro"; import Demo from "../../components/Demo.astro";
import ProjectPage from "../../components/ProjectPage.astro";
export const metadata = { export const metadata = {
title: "Issue", title: "Issue",
description: description: "A simple project management tool for developers. Born out of frustration with Jira.",
"A simple project management tool for developers. Born out of frustration with Jira.", date: "December 2025 - Present",
date: "December 2025 - Present", slug: "issue",
slug: "issue", image: "/issue-icon.svg",
image: "/issue-icon.svg", url: "https://issue.ob248.com",
url: "https://issue.ob248.com", github: "https://github.com/hex248/issue",
github: "https://github.com/hex248/issue", hidden: false,
hidden: false, tags: ["Web", "React", "TypeScript", "Tauri", "PostgreSQL", "Databases", "Bun"],
tags: [ type: "personal",
"Web",
"React",
"TypeScript",
"Tauri",
"PostgreSQL",
"Databases",
"Bun",
],
type: "personal",
}; };
--- ---

View File

@@ -1,23 +1,15 @@
--- ---
import ProjectPage from "../../components/ProjectPage.astro";
import Demo from "../../components/Demo.astro"; import Demo from "../../components/Demo.astro";
import ProjectPage from "../../components/ProjectPage.astro";
export const metadata = { export const metadata = {
title: "MIZU", title: "MIZU",
description: description: "A discord bot card trading and collection game. (Currently inactive, 4000+ players) ",
"A discord bot card trading and collection game. (Currently inactive, 4000+ players) ",
date: "2021 - 2024", date: "2021 - 2024",
slug: "mizu", slug: "mizu",
image: "/mizu-icon.svg", image: "/mizu-icon.svg",
hidden: false, hidden: false,
tags: [ tags: ["Node.js", "TypeScript", "PostgreSQL", "AWS S3", "Discord API", "Database"],
"Node.js",
"TypeScript",
"PostgreSQL",
"AWS S3",
"Discord API",
"Database",
],
type: "personal", type: "personal",
}; };
--- ---

View File

@@ -1,6 +1,6 @@
--- ---
import ProjectPage from "../../components/ProjectPage.astro";
import Demo from "../../components/Demo.astro"; import Demo from "../../components/Demo.astro";
import ProjectPage from "../../components/ProjectPage.astro";
export const metadata = { export const metadata = {
title: "PrayerBud", title: "PrayerBud",

View File

@@ -1,11 +1,10 @@
--- ---
import ProjectPage from "../../components/ProjectPage.astro";
import Demo from "../../components/Demo.astro"; import Demo from "../../components/Demo.astro";
import ProjectPage from "../../components/ProjectPage.astro";
export const metadata = { export const metadata = {
title: "Shleep", title: "Shleep",
description: description: "A couch co-op base defense game where you protect a sleepign child from nightmares.",
"A couch co-op base defense game where you protect a sleepign child from nightmares.",
date: "February - June 2023", date: "February - June 2023",
slug: "shleep", slug: "shleep",
image: "/shleep-icon.svg", image: "/shleep-icon.svg",

View File

@@ -1,26 +1,16 @@
--- ---
import ProjectPage from "../../components/ProjectPage.astro";
import Demo from "../../components/Demo.astro"; import Demo from "../../components/Demo.astro";
import ProjectPage from "../../components/ProjectPage.astro";
export const metadata = { export const metadata = {
title: "Watercooler", title: "Watercooler",
description: description: "Virtual office space for remote teams allowing quick questions and spontaneous chats.",
"Virtual office space for remote teams allowing quick questions and spontaneous chats.",
date: "March 2025", date: "March 2025",
slug: "watercooler", slug: "watercooler",
image: "/watercooler-icon.svg", image: "/watercooler-icon.svg",
// github: "https://github.com/hex248/watercooler", // github: "https://github.com/hex248/watercooler",
hidden: true, hidden: true,
tags: [ tags: ["Web", "React", "TypeScript", "WebRTC", "LiveKit", "PostgreSQL", "OAuth2", "Databases"],
"Web",
"React",
"TypeScript",
"WebRTC",
"LiveKit",
"PostgreSQL",
"OAuth2",
"Databases",
],
type: "personal", type: "personal",
}; };
--- ---

View File

@@ -1,6 +1,6 @@
--- ---
import ProjectPage from "../../components/ProjectPage.astro";
import Demo from "../../components/Demo.astro"; import Demo from "../../components/Demo.astro";
import ProjectPage from "../../components/ProjectPage.astro";
export const metadata = { export const metadata = {
title: "Wiskatron", title: "Wiskatron",

View File

@@ -263,12 +263,7 @@ body {
} }
::selection { ::selection {
background-color: rgba( background-color: rgba(51, 136, 255, 0.25); /* --ayu-selection with opacity */
51,
136,
255,
0.25
); /* --ayu-selection with opacity */
color: var(--ayu-fg); color: var(--ayu-fg);
} }

View File

@@ -1,14 +1,9 @@
{ {
"extends": "astro/tsconfigs/strict", "extends": "astro/tsconfigs/strict",
"include": [ "include": [".astro/types.d.ts", "**/*"],
".astro/types.d.ts", "exclude": ["dist"],
"**/*" "compilerOptions": {
], "jsx": "react-jsx",
"exclude": [ "jsxImportSource": "react"
"dist" }
], }
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "react"
}
}