chore: adopt biome for linting and formatting, wire turbo env, add ci workflow
This commit is contained in:
19
AGENTS.md
19
AGENTS.md
@@ -25,12 +25,17 @@ No CI, no database migrations and no product features yet.
|
||||
- Verification commands, run from the repo root:
|
||||
- `bun run build`
|
||||
- `bun run lint` → `bun run typecheck` → `bun run test` (in that order)
|
||||
- **Lint with Biome** (`biome.json` at the repo root, one config for every workspace): `bun run lint`
|
||||
(per-package via turbo), `bun run lint:fix` (apply safe fixes), `bun run lint:ci` (whole repo, for CI).
|
||||
- **Format with Prettier** (`bun run format`). Biome's formatter and assist are deliberately disabled in
|
||||
`biome.json` so the two tools never fight each other.
|
||||
- `apps/web/src/components/ui/**` is excluded from Biome's recommended preset through an `overrides` entry:
|
||||
those files are vendored shadcn/ui source and get regenerated by the CLI.
|
||||
- **Biome is the only JS/TS tooling: linting, formatting and import sorting.** One `biome.json` at the repo
|
||||
root applies to every workspace.
|
||||
- `bun run lint` → `biome check .` per package through turbo, so it also fails on formatting drift.
|
||||
- `bun run lint:fix` → `biome check --write .` applies lint fixes, formatting and `organizeImports` across
|
||||
the whole repo.
|
||||
- `bun run lint:ci` → `biome ci .` is the whole-repo check used by CI.
|
||||
- `bun run format` / `bun run format:check` are formatting-only.
|
||||
- Markdown (`README.md`, `AGENTS.md`) is not covered: Biome does not format prose.
|
||||
- `apps/web/src/components/ui/**` is excluded from Biome's recommended lint preset through an `overrides` entry:
|
||||
those files are vendored shadcn/ui source regenerated by the CLI. They are still formatted.
|
||||
- CI (`.github/workflows/ci.yml`) runs `db:generate` → `lint:ci` → `typecheck` → `test` → `build`.
|
||||
- Generated files are gitignored and must never be edited by hand: `apps/web/src/routeTree.gen.ts`,
|
||||
`apps/api/src/generated/`.
|
||||
|
||||
@@ -126,7 +131,7 @@ apps/web/src/
|
||||
- `cn` comes from the `cn` package; `src/lib/utils.ts` re-exports it for local imports.
|
||||
- Prefer small feature components over one large route file.
|
||||
- Biome does not flag the `Route` export of route files, so route files stay clean; only the vendored
|
||||
`components/ui` files are exempted from the recommended preset.
|
||||
`components/ui` files are exempted from the recommended lint preset.
|
||||
|
||||
<!-- BEGIN:turborepo-agent-rules -->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user