Skip to content

vue/require-slots-as-functions

enforce properties of $slots to be used as a function

  • ⚙️ This rule is included in the following preset configs:
    • *.configs["flat/essential"]
    • *.configs["flat/strongly-recommended"]
    • *.configs["flat/recommended"]
    • "plugin:vue/essential"
    • "plugin:vue/strongly-recommended"
    • "plugin:vue/recommended"

📖 Rule Details

This rule enforces the properties of $slots to be used as a function.
this.$slots.default was an array of VNode in Vue.js 2.x, but changed to a function that returns an array of VNode in Vue.js 3.x.

Now loading...

🔧 Options

Nothing.

📚 Further Reading

🚀 Version

This rule was introduced in eslint-plugin-vue v7.0.0

🔍 Implementation