# custom-event-name-casing

Rule `vue/custom-event-name-casing`. Enforce specific casing for custom event name

- Source: vue
- Technologies: Vue
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 758.7K weekly downloads of presets that enable it
- Trend: +49.9% last quarter
- Rank: #1594 by reach, #811 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `vue/custom-event-name-casing` | no | no | package `eslint-plugin-vue` | [docs](https://eslint.vuejs.org/rules/custom-event-name-casing.html) |

## Code examples

### Incorrect: the rule reports this

```vue
  <button @click="$emit('my-event')" />
</template>
<script>
export default {
  methods: {
    onClick() {
      /* ✓ GOOD */
      this.$emit('myEvent')
      this.$emit('update:myProp', myProp)

      /* ✗ BAD */
      this.$emit('my-event')
    }
  }
}
</script>
```

```vue
  <button @click="$emit('myEvent')" />
</template>
<script>
export default {
  methods: {
    onClick() {
      /* ✓ GOOD */
      this.$emit('my-event')

      /* ✗ BAD */
      this.$emit('myEvent')
    }
  }
}
</script>
```

```vue
  <button @click="$emit('my-event')" />
</template>
<script>
export default {
  methods: {
    onClick() {
      /* ✓ GOOD */
      this.$emit('myEvent')

      /* ✗ BAD */
      this.$emit('my-event')
    }
  }
}
</script>
```

### Correct: the rule accepts this

```vue
<button @click="$emit('myEvent')" />
```

```vue
<button @click="$emit('my-event')" />
```

```vue
<button @click="$emit('myEvent')" />
```

Examples from the ESLint documentation.

## Enable it

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

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

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

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Anthony Fu's config](https://lintradar.dev/presets/antfu.md) | ESLint | `@antfu/eslint-config` | 294 | 758.7K | +49.9% |

## Related rules

- [vue/component-name-in-template-casing](https://lintradar.dev/rules/vue/component-name-in-template-casing.md): Enforce specific casing for the component naming style in template
- [vue/dot-location](https://lintradar.dev/rules/vue/dot-location.md): Enforce consistent newlines before and after dots in `<template>`
- [vue/comma-style](https://lintradar.dev/rules/vue/comma-style.md): Enforce consistent comma style in `<template>`
- [vue/html-comment-content-spacing](https://lintradar.dev/rules/vue/html-comment-content-spacing.md): Enforce unified spacing in HTML comments
- [vue/comma-spacing](https://lintradar.dev/rules/vue/comma-spacing.md): Enforce consistent spacing before and after commas in `<template>`
- [vue/key-spacing](https://lintradar.dev/rules/vue/key-spacing.md): Enforce consistent spacing between keys and values in object literal properties in `<template>`

---

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