Skip to content

astro-check (error): Delete commented-out escape-room kits page #574

@lsr-explore

Description

@lsr-explore

Delete commented-out escape-room kits page

Labels: dead-code, cleanup
Estimated PR size: 1 file (delete)

Note

Ticket description was generated using Claude Code. Review before starting on a fix.

Note

The following issue adds support for npm run astro:check

Summary

src/pages/escape-room/_kits/[id].astro produces 9 errors because it references the escapeRoomKits collection — which is commented out in src/content.config.ts:90 (and the import at line 257). The file is _-prefixed (so not routed) and is stale code from a deferred feature.

astro check errors

src/pages/escape-room/_kits/[id].astro:54:34 - error ts(2339): Property 'data' does not exist on type 'never'.

54   <Hero slot="header" image={kit.data.image} {crumbs} {title}>
                                    ~~~~
src/pages/escape-room/_kits/[id].astro:53:2 - error ts(2322): Type '{ children: any[]; metadata: PageMetadata; }' is not assignable to type 'IntrinsicAttributes & Props'.
  Property 'title' is missing in type '{ children: any[]; metadata: PageMetadata; }' but required in type 'Props'.

53 <EscapeRoomLayout {metadata}>
    ~~~~~~~~~~~~~~~~
src/pages/escape-room/_kits/[id].astro:41:23 - error ts(2339): Property 'data' does not exist on type 'never'.

41 const { title } = kit.data;
                         ~~~~
src/pages/escape-room/_kits/[id].astro:35:25 - error ts(2344): Type '"escapeRoomKits"' does not satisfy the constraint 'keyof DataEntryMap'.

35   room: CollectionEntry<"escapeRoomKits">;
                           ~~~~~~~~~~~~~~~~
src/pages/escape-room/_kits/[id].astro:28:25 - error ts(2339): Property 'id' does not exist on type 'never'.

28       params: { id: kit.id },
                           ~~
src/pages/escape-room/_kits/[id].astro:23:43 - error ts(2339): Property 'data' does not exist on type 'never'.

23       description: `Overview of the ${kit.data.title} Accessible Escape Room`,
                                             ~~~~
src/pages/escape-room/_kits/[id].astro:22:18 - error ts(2339): Property 'data' does not exist on type 'never'.

22       title: kit.data.title,
                    ~~~~
src/pages/escape-room/_kits/[id].astro:18:25 - error ts(2769): No overload matches this call.
  Overload 1 of 2, '(collection: keyof DataEntryMap, filter?: ((entry: { id: string; body?: string | undefined; collection: "staff"; data: { name: { first: string; middle?: string | undefined; last?: string | undefined; }; ... 4 more ...; cited?: { ...; } | undefined; }; rendered?: RenderedContent | undefined; filePath?: string | undefined; } | ... 12 more ... | { ...; }) => entry is never) | undefined): Promise<...>', gave the following error.
    Argument of type '"escapeRoomKits"' is not assignable to parameter of type 'keyof DataEntryMap'.
  Overload 2 of 2, '(collection: keyof DataEntryMap, filter?: ((entry: { id: string; body?: string | undefined; collection: "staff"; data: { name: { first: string; middle?: string | undefined; last?: string | undefined; }; ... 4 more ...; cited?: { ...; } | undefined; }; rendered?: RenderedContent | undefined; filePath?: string | undefined; } | ... 12 more ... | { ...; }) => unknown) | undefined): Promise<...>', gave the following error.
    Argument of type '"escapeRoomKits"' is not assignable to parameter of type 'keyof DataEntryMap'.

18     await getCollection("escapeRoomKits");
                           ~~~~~~~~~~~~~~~~
src/pages/escape-room/_kits/[id].astro:17:37 - error ts(2344): Type '"escapeRoomKits"' does not satisfy the constraint 'keyof DataEntryMap'.

17   const kits: Array<CollectionEntry<"escapeRoomKits">> =
                                       ~~~~~~~~~~~~~~~~

Suggested fix

Delete src/pages/escape-room/_kits/[id].astro.

If there's an intention to revive the escape-room kits feature, the right move is to keep the source in git history (it'll always be available via git log) rather than carrying a broken file in main. When the feature comes back, restore from history and uncomment the collection together.

Acceptance criteria

  • File deleted.
  • All 9 errors clear.
  • Site still builds (npm run build from astro/).
  • Verify nothing imports from _kits/[id].astro (a _-prefixed file shouldn't be imported, but a quick grep -r "_kits" from astro/src is cheap insurance).

Notes

If the team prefers to keep the file as a TODO marker, an alternative is to comment out the body and leave a one-line // TODO: revive when escapeRoomKits collection is restored — but this leaves dead imports that can rot. Deletion is cleaner.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions