Skip to content
HomePagesHomePages template kit
Menu

template-kit/no-templates

The template-kit/no-templates authoring rule — what it enforces, why, and how to fix it.

A run that gates nothing must never report success. This is what a workspace with no template to check reports instead of a silent pass.

templates/ must hold at least one template folder — for the run you asked for:

  • template-kit check (no argument, from the workspace root): templates/ has no folder in it at all.
  • template-kit check --all: same — no template folder exists to check.
  • template-kit check <name> (or a bare check run from inside a template’s own folder): that one named template does not exist. (A folder that exists but is missing its manifest.json is a different, more specific failure — manifest-invalid — because a folder under templates/ is a template whatever else is wrong with it.)

This is checked once per run, scoped to the workspace, not to any one template.

every() over an empty set is vacuously true. A check run that selected zero templates and reported “check passed” would exit 0 having run not one gate — indistinguishable from a workspace that passed every rule, when in truth no rule ran at all. Anything that re-runs this command on your behalf (an ingest pipeline, a CI step) would accept that silence as a clean submission.

Reporting a diagnostic instead means “nothing to check” is a failure your run surfaces, not a false green light.

Add a template: templates/<key>/ with a manifest.json declaring its section composition, and a sections/ folder holding the sections it composes. If you meant to check a specific template and named it wrong, or ran check from a folder that isn’t a template folder, correct the name or your working directory instead.

my-workspace/
package.json
package-lock.json
templates/ ← empty
$ template-kit check
✗ workspace — 1 problem(s)
[template-kit/no-templates] This workspace has no template to check: templates/ holds no template folder.
fix: Add a template: templates/<key>/ with a manifest.json declaring its section composition and a sections/ folder holding the sections it composes.
my-workspace/
package.json
package-lock.json
templates/
acme-modern/
manifest.json
sections/
hero/
Renderer.tsx
schema.ts
fill-spec.ts
fixtures.ts
$ template-kit check
✓ acme-modern
check passed
  • manifest-invalid — the check that takes over once a template folder exists, on whether its manifest.json is present and correct.