Skip to content
On this page

vue/no-undef-components

disallow use of undefined components in <template>

This rule reports components that are used in the <template>, but that are not defined in the <script setup> or the Options API's components section.

Undefined components will be resolved from globally registered components. However, if you are not using global components, you can use this rule to prevent run-time errors.

Note

This rule cannot check globally registered components and components registered in mixins unless you add them as part of the ignored patterns.

Now loading...
Now loading...
Now loading...

🔧 Options

json
{
  "vue/no-undef-components": ["error", {
    "ignorePatterns": []
  }]
}
  • ignorePatterns Suppresses all errors if component name matches one or more patterns.

ignorePatterns: ['custom(\\-\\w+)+']

Now loading...
Now loading...
Now loading...

🚀 Version

This rule was introduced in eslint-plugin-vue v8.4.0

🔍 Implementation