vue/no-deprecated-functional-template
Disallow the functional attribute on the SFC <template>
Default severity: error
Presets: ecosystem, essential, happy-path, nuxt, opinionated
Automatic fix: None; review the suggested change
Applies to: Vue SFC templates and blocks, with script context where the rule requires it
Options: No rule-specific options. Severity and preset selection are configurable.
Configuration (Vite+)
import { defineConfig } from "@vizejs/vite-plugin/vite-plus";
export default defineConfig({
lint: {
vize: {
"preset": "incremental",
"rules": {
"vue/no-deprecated-functional-template": "error"
}
},
},
});
vp run lint
Bad
The SFC template has the removed functional attribute and reads the old props context.
<template functional>
<div>{{ props.msg }}</div>
</template>
Good
The ordinary template omits functional and reads the component binding msg directly.
<template>
<div>{{ msg }}</div>
</template>
Good avoids this rule's finding under the configuration above; other rules may still report diagnostics.