vue/this-in-template
eslint-plugin-vue
Safe autofixRecommended
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/this-in-template": "error",
},
},
]; <a :href="this.url">
{{ this.text }}
</a>
</template> <a :href="url">
{{ text }}
</a>
</template><a :href="url">
{{ text }}
</a><a :href="this.url">
{{ this.text }}
</a>Examples from the ESLint documentation.
vue/this-in-template
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/this-in-template": "error",
},
},
];Oxlint does not have this rule.
nursery/noVueThisInTemplate
nursery · since 2.6.5
{
"linter": {
"rules": {
"nursery": {
"noVueThisInTemplate": "error"
}
}
}
}Enforce props with default values to be optional
Disallow passing multiple arguments to scoped slots