From 8398a87ebdaed44cc72330ae4abfe7b790e74a59 Mon Sep 17 00:00:00 2001 From: stroblme Date: Sun, 6 Sep 2026 14:25:51 +0200 Subject: [PATCH] Untrack the emitted vite config, and select biome's files by extension MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vite.config.js and vite.config.d.ts are tsc output of vite.config.ts, emitted next to the source when the composite tsconfig.node.json is built. Nothing reads them — and vite picks a vite.config.js ahead of the .ts, so the committed copy was quietly shadowing the real config. Gitignore both. The biome hook selected by the frontend/ prefix and passed the staged paths on, but `bun run lint` runs in frontend/, so biome saw frontend/frontend/… and reported an internal io error for every staged file. The script already lints the whole tree, so stop passing filenames and let the pattern — now the extensions biome parses — decide only whether the hook runs. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01CL9zvnnvcp1mvA8o7impxk --- .gitignore | 6 ++++++ .pre-commit-config.yaml | 10 ++++++++-- frontend/vite.config.d.ts | 2 -- frontend/vite.config.js | 25 ------------------------- 4 files changed, 14 insertions(+), 29 deletions(-) delete mode 100644 frontend/vite.config.d.ts delete mode 100644 frontend/vite.config.js diff --git a/.gitignore b/.gitignore index 3d98533..0585c04 100644 --- a/.gitignore +++ b/.gitignore @@ -20,5 +20,11 @@ __pycache__/ /frontend/screenshots/ *.tsbuildinfo +# Emitted next to the source when the composite tsconfig.node.json is built +# (`tsc -b`). Nothing consumes them, and vite picks a vite.config.js ahead of +# the .ts source — so a committed copy would silently shadow the real config. +/frontend/vite.config.js +/frontend/vite.config.d.ts + # Output of `make docs` (the zensical build of docs/). /site/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index de742ba..3db3dc1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,12 +19,18 @@ repos: exclude: ^frontend/src/client/.* - repo: local hooks: + # `bun run lint` runs in frontend/ and already points biome at the whole + # tree, so the staged paths must not be appended: they are relative to + # this repo root and would reach biome as frontend/frontend/… . The + # pattern only decides whether the hook runs at all — hence the + # extensions biome actually parses, so a text file dropped under + # frontend/ no longer triggers it. - id: local-biome-check name: biome check entry: bun run lint language: system - types: [text] - files: ^frontend/ + pass_filenames: false + files: ^frontend/.*\.([cm]?[jt]sx?|jsonc?|css)$ # Font sizes come from the Tailwind scale only; see the Typography # section in the root DESIGN-GUIDELINES.md. diff --git a/frontend/vite.config.d.ts b/frontend/vite.config.d.ts deleted file mode 100644 index e5ca214..0000000 --- a/frontend/vite.config.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare const _default: import("vite").UserConfig -export default _default diff --git a/frontend/vite.config.js b/frontend/vite.config.js deleted file mode 100644 index 43fd394..0000000 --- a/frontend/vite.config.js +++ /dev/null @@ -1,25 +0,0 @@ -import path from "node:path" -import tailwindcss from "@tailwindcss/vite" -import { tanstackRouter } from "@tanstack/router-plugin/vite" -import react from "@vitejs/plugin-react-swc" -import { defineConfig } from "vite" -// https://vitejs.dev/config/ -export default defineConfig({ - // A portal serves this bundle under a path of its own and caches one copy - // for every instance, so asset URLs have to be absolute under that - // prefix. Unset — every ordinary build — this stays "/". - base: process.env.VITE_BASE || "/", - resolve: { - alias: { - "@": path.resolve(__dirname, "./src"), - }, - }, - plugins: [ - tanstackRouter({ - target: "react", - autoCodeSplitting: true, - }), - react(), - tailwindcss(), - ], -})