Appearance
vue/experimental-script-setup-vars
防止在
<script setup>
中定义的变量被标记为未定义
- ⛔ 此规则在 eslint-plugin-vue v9.0.0 中已删除。
此规则将查找在 <script setup="args">
中定义的变量并将其标记为已定义变量。
¥This rule will find variables defined in <script setup="args">
and mark them as defined variables.
此规则仅在启用 no-undef
规则时才有效。
¥This rule only has an effect when the no-undef
rule is enabled.
警告
<script setup="args">
语法被 Vue 的 RFC 拒绝。查看 新语法。
¥<script setup="args">
syntax was rejected by Vue's RFC. Check out the new syntax.
📖 规则详情
如果没有此规则,此代码将触发警告:
¥Without this rule this code triggers warning:
开启后,props
和 emit
被标记为已定义,no-undef
规则未报告问题。
¥After turning on, props
and emit
are being marked as defined and no-undef
rule doesn't report an issue.
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v7.0.0 中引入
¥This rule was introduced in eslint-plugin-vue v7.0.0
🔍代码实现
¥🔍 Implementation