Skip to content

vue/no-literals-in-template

disallow object, array, and function literals in template

📖 Rule Details

This rule disallows object, array, and function literals in template v-bind directives. These literals are created as new references on every rerender, which can cause the child component's watchers to trigger unnecessarily even when the object hasn't actually changed.

If the literal references a variable from a v-for directive or a scoped slot, it is ignored.

Now loading...

🔧 Options

Nothing.

📚 Further Reading

🚀 Version

This rule was introduced in eslint-plugin-vue v10.7.0

🔍 Implementation