'v-slot' directive doesn't support any modifier #235
Description
I'm new in vue world.
And I'm currently writing a vue/vuetify application using vscodium as IDE.
I follow the standard way to create my app :
vue create my-app
cd my-app
vue add vuetify
Now in vscodium I get this kind of error :
vue/valid-v-slot]
'v-slot' directive doesn't support any modifier.eslint-plugin-vue
for this kind of code :
<template>
<v-data-table
dense
:loading="loading"
:headers="headers"
:items="registrations"
item-key="endpoint"
:items-per-page="5"
class="elevation-1"
@click:row="openLink"
>
<!-- ======= ERROR FOR THIS 2 SLOTS ======== -->
<template v-slot:item.registrationDate="{ item }">
{{ new Date(item.registrationDate) | moment("from") }}
</template>
<template v-slot:item.lastUpdate="{ item }">
{{ new Date(item.lastUpdate) | moment("from") }}
</template>
</v-data-table>
</template>
But the code works and it seems I follow the recommended way by vuetify : https://vuetifyjs.com/en/components/data-tables/#item
I checked eslint-plugin-vue
issues there is a lot of issue reported related to this.
I also find some kind of workaround :
Using this v-slot:[`item.registrationDate`]
instead of v-slot:item.registrationDate
seems to make the validator happy.
It seems there is also a kind of fix but it need some configuration : vuejs/eslint-plugin-vue#1330 (comment)
My question are :
- is the workaround the good way to go ? if yes is the vuetify doc should be updated ?
- is the configuration the good way to go ? if yes, should it be done by default by a vue-cli plugin for vuetify ?
I ask this question here hoping this is the best place halfway between vuetify
and eslint-plugin-vue
.