Skip to content

vue/restricted-component-names

enforce using only specific component names

📖 Rule Details

This rule enforces consistency in component names.

<template> <!-- ✓ GOOD --> <button/> <keep-alive></keep-alive> <!-- ✗ BAD --> <custom-component /> </template>
Now loading...

🔧 Options

json
{
  "vue/restricted-component-names": ["error", { 
    "allow": []
  }]
}

"allow: ['/^custom-/']"

<template> <!-- ✓ GOOD --> <custom-component /> <!-- ✗ BAD --> <my-component /> </template>
Now loading...

🚀 Version

This rule was introduced in eslint-plugin-vue v9.32.0

🔍 Implementation