mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-14 18:01:20 +08:00
628b99d62b
Three new lint rules for parameterized compositions:
1. invalid_data_props_json (error): Catches malformed JSON in data-props
attributes — typos, arrays instead of objects, missing quotes.
2. mustache_placeholder_without_default (warning): Warns when sub-composition
files use {{key}} without a default ({{key:default}}). Compositions without
defaults break when rendered standalone (invalid CSS, raw mustache text).
Only fires for files in compositions/ directory.
3. unused_data_props_key (warning): Detects data-props keys that don't match
any {{placeholder}} in the referenced inline template. Catches typos like
{"titl":"Pro"} when the template has {{title}}. Shows available placeholders
in the fix hint. Only works for inline templates (same-file); cross-file
validation for data-composition-src requires a multi-file lint pass.
Also adds rawSource to LintContext for rules that need the original HTML
before template unwrapping.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>