Skip to content

vue/valid-v-is

enforce valid v-is directives

  • ⚙️ 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"

This rule checks whether every v-is directive is valid.

📖 Rule Details

This rule reports v-is directives in the following cases:

  • The directive has that argument. E.g. <div v-is:aaa="foo"></div>
  • The directive has that modifier. E.g. <div v-is.bbb="foo"></div>
  • The directive does not have that attribute value. E.g. <div v-is></div>
  • The directive is on Vue-components. E.g. <MyComponent v-is="foo"></MyComponent>
Now loading...

Note

This rule does not check syntax errors in directives because it's checked by vue/no-parsing-error rule.

🔧 Options

Nothing.

📚 Further Reading

🚀 Version

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

🔍 Implementation