vue/prefer-template
eslint-plugin-vue
Safe autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/prefer-template": "error",
},
},
];const s = foo + "baz";const s = 1 + 2 + "foo" + 3;const s = 1 * 2 + "foo";let s = "foo" + "bar" + `baz`;let s = `value: ${1}`;Examples from the Biome documentation.
vue/prefer-template
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/prefer-template": "error",
},
},
];Oxlint does not have this rule.
style/useTemplate
style · since 1.0.0
{
"linter": {
"rules": {
"style": {
"useTemplate": "error"
}
}
}
}Require template literals instead of string concatenation
Require or disallow method and property shorthand syntax for object literals in <template>
Enforce consistent spacing inside array brackets in <template>
Enforce consistent spacing before and after the arrow in arrow functions in <template>