Vue:从模板中删除 "this" 的 ESlint 规则
Vue: ESlint rule to remove "this" from template
我正在尝试查看是否有现有的 ESlint 规则可以删除 this
在 props 或数据之前使用。
示例:
<template>
<div v-if="this.foo"></div>
</template>
理想情况下,这会被 linter 捕获,因为 this.foo
而不仅仅是 foo
。是否存在这方面的规则?我最近几天尝试搜索,但没有找到。
this
(没有双关语意)就是您要找的。虽然它不会明确地'remove'它,但我相信它会抛出一个错误供您查看。
我正在尝试查看是否有现有的 ESlint 规则可以删除 this
在 props 或数据之前使用。
示例:
<template>
<div v-if="this.foo"></div>
</template>
理想情况下,这会被 linter 捕获,因为 this.foo
而不仅仅是 foo
。是否存在这方面的规则?我最近几天尝试搜索,但没有找到。
this
(没有双关语意)就是您要找的。虽然它不会明确地'remove'它,但我相信它会抛出一个错误供您查看。