New rules
- Added new
vue/no-content-outside-blockrule (#3119) - Added new
vue/no-define-model-defaultrule (#3146) - Added new
vue/no-props-shadowrule (#3118)
New rule options
- Added
requiredoption tovue/block-langto report components that omit a required block entirely (#3125) - Added
ignoreMixinsoption tovue/require-explicit-emitsrule (#3141)
Fixed false negatives (may result in more lint issues)
- Added support for refs detected by type information, such as refs returned from composables, to
vue/no-ref-as-operandrule (#3144) - Fixed
vue/no-dupe-keysnot reportingdefineModel()names that collide with a prop, another model, or a<script setup>variable (#3163) - Fixed
vue/no-dupe-keysnot reporting<script setup>variables that shadow a prop while aliasing a different one, such asconst foo = toRef(props, 'bar')(#3124) - Fixed
vue/no-multi-spacesnot reporting multiple spaces in the tags of some top-level blocks, e.g.<script setup>(#3162) - Fixed
vue/no-ref-as-operandandvue/no-ref-object-reactivity-lossto also check refs created withuseTemplateRef()(#3154) - Fixed
vue/no-unused-propertiesnot reporting unused non-props properties in components that use$propsas a whole (e.g.v-bind="$props") (#3161) - Fixed
vue/padding-lines-in-component-definitionto check every pair of adjacent properties, not only the first, whenwithinOptionorwithinEachis not set (#3155) - Fixed
vue/require-default-prop,vue/no-boolean-default,vue/no-required-prop-with-defaultandvue/require-valid-default-propnot handling defaults that are passed towithDefaults()by reference or spread instead of an inline object literal (#3114)
Fixed false positives (may result in fewer lint issues)
- Changed
vue/singleline-html-element-content-newlineandvue/multiline-html-element-content-newlinerules to ignorerouter-linkandnuxt-linkelements by default (#3165) - Fixed
vue/no-undef-propertiesfalse positives for properties returned via...toRefs(reactive({ ... }))fromsetup()(#3134) - Fixed
vue/require-typed-reffalse positives when an explicit type annotation already applies to theref()call (#3123) - Fixed
vue/v-if-else-keyfalse positive for components with a bound:key(#3150)
Other changes
- Removed Reactivity Transform support from
vue/no-ref-object-reactivity-loss, since the Reactivity Transform proposal was dropped from Vue (#3126) - Changed
vue/html-self-closingto treat Vue's special<slot>and<template>elements as components (html.componentoption) instead of normal HTML elements (#3164) - Changed
vue/attributes-orderrule to provide a suggestion instead of an autofix when the fix would move a binding acrossv-bind="object"(#3145) - Improved performance of
vue/no-reserved-component-namesby no longer rebuilding its reserved name sets for every file (#3147)