Vize

vue/slot-name-casing

Enforce configured casing for rendered slot names.

Default severity Presets Automatic fix Options
warning nuxt, opinionated No Rule options

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

Checks the static name of a rendered slot outlet. The parent-side v-slot and #name provider syntax is outside this rule.

Bad

The rendered slot outlet uses the hyphenated static name my-slot, while the default convention requires camelCase.

<template>
<MyCard><slot name="my-slot" /></MyCard>
</template>

Good

The outlet's static name uses camelCase. Parent-side #name provider syntax is outside this rule.

<template>
<MyCard><slot name="mySlot" /></MyCard>
</template>

Configuration (Vite+)

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

export default defineConfig({}).withVue({
  linter: {
    "preset": "incremental",
    "rules": {
      "vue/slot-name-casing": "warn"
    },
    "ruleOptions": {
      "vue/slot-name-casing": "camelCase"
    }
  },
});

Then run vp run lint.