Skip to content

docs examples have no type gate — invalid enum values survive every check #809

Description

@johnleider

Found during the Emerald docs QA (PR #808): an example shipped tone: 'success' against EmCalendarTone — a plain type error against the file's own annotation — and passed pnpm build:docs, lint, and the full pre-push gate. It was caught only by a human reading the file.

Cause: apps/docs has no typecheck script, and root pnpm typecheck filters to ./packages/*, so nothing in the repo type-checks docs pages' examples (apps/docs/src/examples/**). Vite compiles SFCs without type checking.

Options, roughly in effort order:

  1. Add a typecheck script to apps/docs (vue-tsc over src/examples/** at minimum) and include it in the root filter + CI.
  2. Scope it to examples only with a dedicated tsconfig if a full app typecheck is too noisy to adopt at once.

The dev app (dev/) already has a working vue-tsc typecheck script to crib from. Worth landing before the docs surface grows past the six pilot pages — the hand-authored era is exactly when type drift in examples is most likely.

Metadata

Metadata

Assignees

Labels

T: bugSomething isn't workingdocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions