TL-M0-06 · Biome
Why: Biome formats and lints the whole repository from one config at the root (D6). The config turns on the Next.js and React rules, and blocks direct Postgres drivers and ORMs outside tools/ (D4).
ID TL-M0-06 · Level L0 · Run order row 6
pnpm lint checks the repository with Biome 2.5.15 and passes.
Before
Section titled “Before”TL-M0-05 is Done.
1 · Add Biome, pinned
Section titled “1 · Add Biome, pinned”pnpm add -Dw -E @biomejs/biome@2.5.152 · Write the config. The setopt line stops zsh from treating the ! characters in the file as history commands
Section titled “2 · Write the config. The setopt line stops zsh from treating the ! characters in the file as history commands”setopt no_bang_histcat > biome.json <<'EOF'{ "$schema": "./node_modules/@biomejs/biome/configuration_schema.json", "vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true, "defaultBranch": "main" }, "files": { "ignoreUnknown": true, "includes": ["**", "!**/*.svg", "!packages/db-types/src/database.ts"] }, "formatter": { "enabled": true, "indentStyle": "space", "indentWidth": 2, "lineWidth": 100 }, "linter": { "enabled": true, "rules": { "preset": "recommended", "style": { "noRestrictedImports": { "level": "error", "options": { "paths": { "pg": "Apps never connect to Postgres directly; use @supabase/ssr.", "postgres": "Apps never connect to Postgres directly; use @supabase/ssr.", "drizzle-orm": "No ORM in v2 (D4)." } } } } }, "domains": { "next": "recommended", "react": "recommended" } }, "overrides": [ { "includes": ["tools/**"], "linter": { "rules": { "style": { "noRestrictedImports": "off" } } } } ], "assist": { "enabled": true, "actions": { "source": { "organizeImports": "on" } } }}EOF3 · Root scripts, then check the repository
Section titled “3 · Root scripts, then check the repository”pnpm pkg set scripts.lint="biome check ." scripts.format="biome check --write ."pnpm lint4 · Commit
Section titled “4 · Commit”git add -Agit commit -m "build: add Biome"Expect
Section titled “Expect”- Block 1: “+ @biomejs/biome 2.5.15”.
- Block 3: “Checked … files in …ms. No fixes applied.”
- Block 4: the commit line.
pnpm biome --versionpnpm biome ci .echo $?Version: 2.5.15, then “No fixes applied”, then 0.
If it fails
Section titled “If it fails”- “zsh: event not found”: the setopt line was skipped. Run it, then paste block 2 again.
- Biome reports a configuration error: check the version first (the config was tested with 2.5.15), then paste the error.
git reset --hard HEAD~1pnpm installDone 2026-10-05 (zuki)