Skip to content

Files

Latest commit

 

History

History
29 lines (20 loc) · 538 Bytes

no-unused-vars.md

File metadata and controls

29 lines (20 loc) · 538 Bytes

Pattern: Unused variable definition

Issue: -

Description

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

<template>
  <!-- ✓ GOOD -->
  <ol v-for="i in 5">
    <li>{{ i }}</li>
  </ol>

  <!-- ✗ BAD -->
  <ol v-for="i in 5">
    <li>item</li>
  </ol>
</template>

Further Reading