vue/component-options-name-casing
eslint-plugin-vue
Safe autofix
eslint.config.js
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/component-options-name-casing": "error",
},
},
];<template>
<div>
<!-- All are invalid. DO NOT use like these. -->
<KebabCase />
<kebabCase />
<CamelCase />
</div>
</template>
<script>
export default {
components: {
camelCase: MyComponent,
'kebab-case': MyComponent
}
}
</script>The documentation shows no correct example for this rule.
Examples from the ESLint documentation.
vue/component-options-name-casing
eslint-plugin-vue
import vue from "eslint-plugin-vue";
export default [
{
plugins: { vue },
rules: {
"vue/component-options-name-casing": "error",
},
},
];Oxlint does not have this rule.
nursery/useVueRegisteredComponentNameCasing
nursery · since 2.6.8
{
"linter": {
"rules": {
"nursery": {
"useVueRegisteredComponentNameCasing": "error"
}
}
}
}Enforce order of compiler macros (defineProps, defineEmits, etc.)
Enforce dot notation whenever possible in <template>
Disallow empty destructuring patterns in <template>
Disallow irregular whitespace in .vue files
Disallow literal numbers that lose precision in <template>