Vize

vue/no-restricted-component-names

disallow specific component names.

Default severity Presets Automatic fix Options
warning None No None

Applies to: Vue SFC templates and blocks, with script context where the rule requires it.

Bad

The component name is the forbidden RestrictedShowcase.

<script setup lang="ts">
defineOptions({ name: "RestrictedShowcase" });
</script>
<template>
  <p>ok</p>
</template>

Good

The component name is Widget.

<script setup lang="ts">
defineOptions({ name: "Widget" });
</script>
<template>
  <p>ok</p>
</template>

Configuration (Vite+)

import { defineConfig } from "@vizejs/vite-plugin/vite-plus";

export default defineConfig({}).withVue({
  linter: {
    "preset": "incremental",
    "rules": {
      "vue/no-restricted-component-names": "warn"
    },
    "ruleOptions": {
      "vue/no-restricted-component-names": [
        "RestrictedShowcase"
      ]
    }
  },
});

Then run vp run lint.