Skip to content

Latest commit

 

History

History
31 lines (22 loc) · 756 Bytes

no-unused-vars.md

File metadata and controls

31 lines (22 loc) · 756 Bytes

disallow unused variable definitions of v-for directives or scope attributes (weex/vue/no-unused-vars)

  • ⚙️ This rule is included in all of "plugin:weex/vue/essential", "plugin:weex/vue/strongly-recommended" and "plugin:weex/vue/recommended".

This rule report variable definitions of v-for directives or scope attributes if those are not used.

📖 Rule Details

👎 Examples of incorrect code for this rule:

<template>
  <ol v-for="i in 5"><!-- "i" is defined but never used. -->
    <li>item</li>
  </ol>
</template>

👍 Examples of correct code for this rule:

<template>
  <ol v-for="i in 5">
    <li>{{i}}</li><!-- "i" is defined and used. -->
  </ol>
</template>

🔧 Options

Nothing.