JS.VUE.NO.DEPRECATED.SLOT.SCOPE.ATTRIBUTE

Disallow deprecated 'slot-scope' attribute (in Vue.js 2.6.0+)

Rule Details

This rule reports deprecated slot-scope attribute in Vue.js v2.6.0+.

{'vue/no-deprecated-slot-scope-attribute': ['error']}

Copy
<template>
  <ListComponent>
    <!-- GOOD -->
    <template v-slot="props">
      {{ props.title }}
    </template>
  </ListComponent>
  <ListComponent>
    <!-- BAD -->
    <template slot-scope="props">
      {{ props.title }}
    </template>
  </ListComponent>
</template>

Further Reading

  • API - slot-scope (https://v2.vuejs.org/v2/api/#slot-scope-deprecated)

The content on this page is adapted from the ESLint User Guide. Copyright © OpenJS Foundation and other contributors, www.openjsf.org. All rights reserved. https://eslint.org/docs/rules/