# component-definition-name-casing

Rule `vue/component-definition-name-casing`. Enforce specific casing for component definition name

- Source: vue
- Technologies: Vue
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 11.8M weekly downloads of presets that enable it
- Trend: +49.7% last quarter
- Rank: #844 by reach, #847 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/component-definition-name-casing` | yes | safe | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/component-definition-name-casing.html) |
| Oxlint | `vue/component-definition-name-casing` | no | safe | plugin `vue`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/vue/component-definition-name-casing.html) |

## Code examples

### Incorrect: the rule reports this

```vue
<script>
export default {
  name: 'foo-bar'
}
</script>
```

### Correct: the rule accepts this

```vue
<script>
export default {
  name: 'FooBar'
}
</script>
```

Examples from the Oxlint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import vue from "eslint-plugin-vue";

export default [
  {
    plugins: { vue },
    rules: {
      "vue/component-definition-name-casing": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "vue"
  ],
  "rules": {
    "vue/component-definition-name-casing": "error"
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Vue recommended](https://lintradar.dev/presets/vue-recommended.md) | ESLint | `eslint-plugin-vue` | 118 | 9.5M | +46.6% |
| [Vue strongly recommended](https://lintradar.dev/presets/vue-strongly-recommended.md) | ESLint | `eslint-plugin-vue` | 110 | 9.5M | +46.6% |
| [Nuxt](https://lintradar.dev/presets/nuxt.md) | ESLint | `@nuxt/eslint-config` | 188 | 1.5M | +72.8% |
| [Anthony Fu's config](https://lintradar.dev/presets/antfu.md) | ESLint | `@antfu/eslint-config` | 294 | 758.7K | +49.9% |

## Related rules

- [vue/no-unused-components](https://lintradar.dev/rules/vue/no-unused-components.md): Disallow registering components that are not used inside templates
- [vue/v-on-event-hyphenation](https://lintradar.dev/rules/vue/v-on-event-hyphenation.md): Enforce v-on event naming style on custom components in template
- [vue/no-parsing-error](https://lintradar.dev/rules/vue/no-parsing-error.md): Disallow parsing errors in `<template>`
- [vue/first-attribute-linebreak](https://lintradar.dev/rules/vue/first-attribute-linebreak.md): Enforce the location of first attribute
- [vue/jsx-uses-vars](https://lintradar.dev/rules/vue/jsx-uses-vars.md): Prevent variables used in JSX to be marked as unused
- [vue/html-end-tags](https://lintradar.dev/rules/vue/html-end-tags.md): Enforce end tag style

---

Web page: https://lintradar.dev/rules/vue/component-definition-name-casing. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
