ionic-team / tutorial-photo-gallery-vue

Photo Gallery Tutorial: Ionic Vue and Capacitor
https://ionicframework.com/docs/vue/your-first-app
60 stars 43 forks source link

vue/no-deprecated-slot-attribute #2

Closed peterennis closed 4 years ago

peterennis commented 4 years ago

VS Code Install recommended extension (Vetur) Shows error on slot Deprecated in Vue but still used in Ionic

2020-10-03 20_27_42-Window

2020-10-03 20_29_32-Window

dotNetkow commented 4 years ago

I'm using Vetur too! Great extension. I'm surprised that syntax highlighting isn't natively included in VS Code...

Anyway, this is expected. I'm not a Vue expert, but it's my understanding that Vue 2 templates had a "slot" attribute. They are deprecated in Vue 3, hence the warning. However, "slot" is a valid web component attribute, and since Ionic 4+ is built on web components, this warning is triggered. So, Vetur is right, but it's also wrong. :)

You can safely ignore it. If it bothers you, try turning off "Vetur > Validation: Template." Cheers!