vue/slot-name-casing
eslint-plugin-vue
No autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/slot-name-casing": "error",
},
},
]; <slot name="foo-bar" />
<slot name="foo_bar" />
<slot name="foo:bar" />
</template> <slot name="fooBar" />
<slot name="foo_bar" />
<slot name="foo:bar" />
</template> <slot name="foo-bar" />
<slot name="fooBar" />
<slot name="foo_bar" />
<slot name="foo:bar" />
</template><slot name="foo" />
<slot name="fooBar" /><slot name="foo" />
<slot name="foo-bar" /><slot name="foo" />Examples from the ESLint documentation.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
vue/slot-name-casing
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/slot-name-casing": "error",
},
},
];Oxlint does not have this rule.
nursery/useVueSlotNameCasing
nursery · since 2.6.5
{
"linter": {
"rules": {
"nursery": {
"useVueSlotNameCasing": "error"
}
}
}
}Enforce adding type declarations to object props
Enforce writing style for handlers in v-on directives