Skip to content
SprecherEast
Issue 254

tech-debt: Split the seed script under the 250-line limit

Back to our plan
Open
cmstech-debtpriority: low

Type

tech-debt

Summary

Split src/endpoints/seed/index.ts (455 lines) into smaller files, so the 250-line limit holds for every hand-written file.

Problem

#137 (PR #252) set ESLint's max-lines to 250. The seed script is the one hand-written file over it. It is listed as an exception in docs/architecture/README.md and excluded from lint.

Proposed fix

  • Move each collection's seeding into its own file next to the seed data, with index.ts only running them in order.
  • No change to what the seed creates; keep context: { disableRevalidate: true } and the SEED_PASSWORD rule. Combine with #251 (explicit overrideAccess on the seed writes) if convenient.
  • Remove the seed script from the Exceptions table and lint it.

Acceptance criteria

  • Not done: No file under src/endpoints/seed/ over 250 lines, and the folder is linted.
  • Not done: Seeding a fresh database gives the same content as before.

Area

cms

Priority

low


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab