Skip to content

vue/require-valid-default-prop

enforce props default values to be valid

  • ⚙️ This rule is included in all of "plugin:vue/vue3-essential", "plugin:vue/essential", "plugin:vue/vue3-strongly-recommended", "plugin:vue/strongly-recommended", "plugin:vue/vue3-recommended" and "plugin:vue/recommended".

📖 Rule Details

This rule checks whether the default value of each prop is valid for the given type. It should report an error when default value for type Array or Object is not returned using function.

Now loading...

🔧 Options

Nothing.

📚 Further Reading

🚀 Version

This rule was introduced in eslint-plugin-vue v3.13.0

🔍 Implementation