JS.VUE.NO.DEPRECATED.SLOT.ATTRIBUTE

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

Rule Details

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

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

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

Further Reading

  • API - slot (https://v2.vuejs.org/v2/api/#slot-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/