Repository navigation
feat(check): catch twelve more template mistakes before the app runs (#207) - #229
Merged
Merged
Conversation
…M event tables The template lint rules for #207 need more data from the standards than the attribute index gave: which attributes are boolean, every WAI-ARIA 1.2 and 1.3 state and property, SVG and obsolete HTML element names, and the DOM event names a listener may use. The generator now reads each from its published source, with saved copies accepted for an offline refresh. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ver (#207) citry check and the editor now report, from the template alone: misspelled attributes, elements, and DOM events; unknown aria-* names; block elements inside <p>; literal ids two elements always render; <img> without alt (warning); v-model on an element that holds no value; and Vue expressions that are not valid JavaScript. The misspelled-directive rule now covers v-* names such as v-iff, the attribute-value rule reports a boolean attribute with a value other than its own name, and the component-listener rule reports lowercase names such as @hdie and gets a rule_undeclared_component_event setting. Each rule has a rule_* setting on LintSettings and on a component's Lint class, and the template-only ones also run in citry check --static. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…mplate rules From the independent review of the #207 rules: the Vue-only checks (v-* directive typos, v-model targets, DOM event names) now skip v-pre content, which Vue leaves as written; a whitespace-only Vue expression is reported; obsolete block elements close a paragraph and <noscript> does not; <slot> bindings are slot props; c-empty counts as a condition for duplicate ids; a root <img> inside a top-level c-if chain counts as the single root; no message suggests v-once or v-memo; a bound boolean string gets its own message. The catalog text now matches the code, and the editor drops a TypeScript error that repeats an invalid Vue expression. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Two separate top-level c-if blocks can both render, so neither image there is the single root Vue passes a parent's alt to. Also correct the docs and catalog wording the second review pass found. Co-Authored-By: Claude Opus 5.5 <[email protected]>
JuroOravec
changed the base branch from
main
to
benchmarks/errors-shared-value
October 21, 2026 10:53
This was referenced Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #207. Moves twelve mistakes that the error-prevention benchmark found Citry missing, or reporting only when the page runs, into
citry checkand the editor. These are the rules that need no information beyond the template itself. The rules that need the loaded app come in a follow-up PR, and the larger designs are proposals waiting for review.New and extended rules
<div titel="x">citry.template.misspelled-attribute<dvi>citry.template.misspelled-element:aria-expandd="open"citry.template.unknown-aria-attribute<p><p><div>…</div></p>citry.template.invalid-nestingidtwice<div id="board">citry.template.duplicate-id<img>withoutalt<img src="a.png">citry.template.missing-image-altv-modelon an element that holds no value<form v-model="q">citry.browser.invalid-model-target<button @clik="…">citry.vue.misspelled-eventv-if="open &&"citry.vue.invalid-expressionv-directive<p v-iff="x">citry.template.misspelled-directive(extended)disabled="false",disabled="true"citry.template.invalid-attribute-value(extended)<c-Card @hdie="…">citry.browser.undeclared-component-event(extended, now configurable)Each rule has a
rule_*setting inLintSettingsand in a component'sLintclass.How the rules avoid false matches:
aria-*name is reported, because authors can't invent new ones.scripts/generate_html_attribute_values.py.Evidence
citry checkandcitry check --types. Eleven also show up in--static; the component-event rule needs the app.--platform linux.Release note
citry-lsp declares
citry>=0.6.0but needs the new names, so its minimum citry version must be raised at release. The same was already true onmain.🤖 Generated with Claude Code