$ the-wire · showcase
eslint-plugin-vue stops corrupting fixed templates
By RepoJournal · Filed · About Vue.js · Composed from the cited sources · methodology
A run of autofix bugs in eslint-plugin-vue and two type-narrowing fixes in language-tools make this a day of linter and language-server correctness rather than new features.
fix(no-useless-mustaches): don't autofix when the result changes the rendered text vuejs/eslint-plugin-vue
vue/no-useless-mustaches used to rewrite a mustache to plain text without checking how it joins the surrounding text; it now leaves the case alone, so <code>{{ '{{' }} count }}</code> and <p>{{ '&' }}copy;</p> stay literal instead of rendering the value of count and a copyright sign under --fix.
fix(language-core): isolate template virtual code from setup control flow vuejs/language-tools
The template virtual code was emitted inline after the <script setup> statements and inherited narrowing that only holds at the end of setup; it now runs in its own __VLS_template function, which clears the never reads under v-if="chart" for values reassigned in onMounted and the spurious TS2367 and TS7022/TS7023 reports.
fix(no-undef-components): recognize self-reference by `defineOptions` name vuejs/eslint-plugin-vue
vue/no-undef-components used to flag a <script setup> component that renders itself under the name it sets with defineOptions({ name }); it now recognizes the self-reference, which is the pattern behind recursive trees and menus.
fix(component-name-in-template-casing): check only the part before the dot of namespaced components vuejs/eslint-plugin-vue
With registeredComponentsOnly: false, namespaced tags like <Form.Input> were reported as wrong-cased and --fix replaced the tag with itself until ESLint halted on "Circular fixes detected"; the rule now checks only the namespace, the single part the compiler resolves.
fix(language-core): re-assert dot-value bindings in template closures vuejs/language-tools
The language server now re-asserts __VLS_withDotValue bindings inside template arrow functions, function expressions, methods, accessors and class static blocks, ending the false "Property 'value' does not exist" reports for imports and let/var bindings; class property initializers remain unhandled.
Action items
- → Re-run eslint --fix with the updated eslint-plugin-vue and revert any codemod output that turned a literal {{ or & in... vuejs/eslint-plugin-vue [plan]