diff --git a/.claude/launch.json b/.claude/launch.json index 097d843..5e5163e 100644 --- a/.claude/launch.json +++ b/.claude/launch.json @@ -5,7 +5,7 @@ "name": "dev", "runtimeExecutable": "bun", "runtimeArgs": ["run", "dev"], - "port": 5173 + "port": 4321 } ] } diff --git a/.claude/skills/commit/SKILL.md b/.claude/skills/commit/SKILL.md index 03a4315..328de57 100644 --- a/.claude/skills/commit/SKILL.md +++ b/.claude/skills/commit/SKILL.md @@ -87,12 +87,12 @@ Each commit should contain one logical change. Create separate commits for: **Stage together:** -- New component `ContractSection.vue` + its import and usage in `App.vue` +- New component `ContractSection.astro` + its import and usage in `index.astro` - A copy change in `data.ts` + the matching markup tweak in the section component that renders it **Stage separately:** -- Two new components `StackSection.vue` and `EducationSection.vue`, each with their own `App.vue` wiring +- Two new components `StackSection.astro` and `EducationSection.astro`, each with their own `index.astro` wiring - A `useTheme.ts` composable change + an unrelated style fix in `style.css` ## Instructions diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 479ff16..846f5d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,8 +18,11 @@ jobs: - name: Install dependencies run: bun install --frozen-lockfile - - name: Lint and check formatting - run: bunx biome ci . + - name: Lint + run: bun run lint + + - name: Check formatting + run: bun run format:check - name: Type-check and build run: bun run build diff --git a/.gitignore b/.gitignore index 2f79262..405a522 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,6 @@ dist-ssr *.njsproj *.sln *.sw? + +# Astro +.astro diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 0000000..5a7e81d --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,16 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "useTabs": true, + "tabWidth": 4, + "printWidth": 120, + "singleQuote": false, + "jsxSingleQuote": false, + "quoteProps": "as-needed", + "trailingComma": "all", + "semi": true, + "arrowParens": "always", + "bracketSameLine": false, + "bracketSpacing": true, + "ignorePatterns": ["bun.lock"], + "astro": true +} diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..d82a139 --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,14 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["typescript", "unicorn", "oxc", "import"], + "categories": { + "correctness": "error" + }, + "rules": { + "no-unused-vars": "error", + "prefer-const": "error", + "typescript/no-explicit-any": "error", + "typescript/no-non-null-assertion": "error" + }, + "ignorePatterns": ["dist", ".astro"] +} diff --git a/CODE_STYLE.md b/CODE_STYLE.md index 8c44339..24e1a4e 100644 --- a/CODE_STYLE.md +++ b/CODE_STYLE.md @@ -2,7 +2,7 @@ ## Formatting -Biome: tabs (width 4), double quotes, semicolons, trailing commas, 120 char width. No `any`, no unused vars/imports, no non-null assertions. Vue SFCs relax the unused/undeclared rules. `bun run lint` to check, `bun run format` to fix. +Oxfmt: tabs (width 4), double quotes, semicolons, trailing commas, 120 char width. Oxlint: no `any`, no unused vars, no non-null assertions. `bun run lint` to lint, `bun run format` to fix formatting. ### Blank Lines @@ -10,16 +10,16 @@ Blank line after multi-line block (3+ lines) when followed by another statement. ```typescript // Good -watchEffect(() => { - localStorage.setItem("theme", theme.value); - document.documentElement.classList.toggle("dark", isDark.value); +button?.addEventListener("click", () => { + const dark = !root.classList.contains("dark"); + apply(dark); }); -export function useTheme() { ... } +apply(root.classList.contains("dark")); // Good - single lines together +const root = document.documentElement; const media = window.matchMedia("(prefers-color-scheme: dark)"); -const systemDark = ref(media.matches); ``` ## Comments @@ -43,28 +43,33 @@ const toggle = () => { ... }; Prefer popular, well-maintained packages over hand-rolling functionality for anything with a standard. Avoid general-purpose utility packages like `lodash` to keep bundle size in check; import only focused, single-purpose packages. -## Vue / Frontend +## Astro / Frontend -**Component Organization:** One component per section in `src/components/`. Small, one-time-use markup can stay inline in its parent. Larger or reusable pieces get their own file. +**Component Organization:** Pages in `src/pages/`, the shared shell in `src/layouts/Layout.astro`, one component per section in `src/components/`. Small, one-time-use markup can stay inline in its parent. Larger or reusable pieces get their own file. **Content vs markup:** All copy, links, and profile data live in `src/data.ts`. Components render data, they do not embed prose. +**JavaScript:** The site ships static HTML. Keep client scripts to small inline ` - -
- - - -