diff --git a/.cursor/rules/no-default-export-typescript.mdc b/.cursor/rules/no-default-export-typescript.mdc new file mode 100644 index 0000000..25cd64c --- /dev/null +++ b/.cursor/rules/no-default-export-typescript.mdc @@ -0,0 +1,16 @@ +--- +description: Named exports only in TypeScript; no default exports +globs: + - "**/*.ts" + - "**/*.tsx" +alwaysApply: false +--- + +# No default exports (TypeScript) + +- Prefer **named exports** only: `export const Component = …`, `export { foo }`, and similar. +- Do **not** add `export default`, including `export { Name as default }`, unless the file is an allowed tooling entrypoint (see below). + +**Exception:** `apps/web/vite.config.ts` and `apps/web/openapi-ts.config.ts` may use `export default` because Vite and `@hey-api/openapi-ts` load the config via the module’s default export. Biome disables `style/noDefaultExport` for those paths in `apps/web/biome.json`. + +Where this repository runs Biome with `style.noDefaultExport`, that config applies to the linted tree (see `apps/web/biome.json`). diff --git a/PLAN.md b/PLAN.md index 72ad681..34d5703 100644 --- a/PLAN.md +++ b/PLAN.md @@ -27,7 +27,7 @@ Tasks and subtasks for building the bread-recipes app (SolidJS + Python REST + O - [x] **4.1** Scaffold SolidJS + Vite + TypeScript in `apps/web`; **Biome** (lint + format + import organise); Vitest configured; exact dependency versions only; `README.md` for the app. - [x] **4.2** Generate or synchronise typed API usage from the OpenAPI spec (client/types) so API calls stay strictly typed. -- [ ] **4.3** App shell: router, layout, and global styles (clean, minimalist, bread-appropriate palette, responsive). +- [x] **4.3** App shell: router, layout, and global styles (clean, minimalist, bread-appropriate palette, responsive). - [ ] **4.4** Home page: fetch and list bread recipes with overview + thumbnail; navigate to detail on click. - [ ] **4.5** Recipe page: full recipe content and larger image; deep-linkable route (e.g. by id). - [ ] **4.6** MSW for tests; knip configured; Vitest coverage at 100% with a CI gate. diff --git a/apps/web/README.md b/apps/web/README.md index 4fd8012..83b4da6 100644 --- a/apps/web/README.md +++ b/apps/web/README.md @@ -33,6 +33,10 @@ Run from **`apps/web`** (or via **`pnpm --filter web