vuejs / eslint-plugin-vue

Official ESLint plugin for Vue.js
https://eslint.vuejs.org/
MIT License
4.47k stars 667 forks source link

fix(no-deprecated-slot-attribute): no fix for dynamic components #2530

Closed privatenumber closed 2 months ago

privatenumber commented 3 months ago

Warning: I made this PR on top of https://github.com/vuejs/eslint-plugin-vue/pull/2529 but I needed to open a PR against the master branch for it to show up in this repo

The #slot syntax doesn't work when passed into a native HTML <div> element for obvious reasons.

However, the old slot="name" syntax works... Demo

This can happen (and has happened in my work project) when a dynamic component renders a div to fallback when certain conditions aren't met: