# no-restricted-custom-event

Rule `vue/no-restricted-custom-event`. Disallow specific custom event

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

## Linters

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

## Code examples

### Incorrect: the rule reports this

```vue
<input @input="$emit('input', $event.target.value)">
```

```vue
  <input @input="$emit('input', $event.target.value)">
</template>
<script>
export default {
  methods: {
    handleChangeValue(newValue) {
      /* ✗ BAD */
      this.$emit('input', newValue)
    }
  }
}
</script>
```

### Correct: the rule accepts this

```vue
  <input @input="$emit('update:value', $event.target.value)">
</template>
<script>
export default {
  methods: {
    handleChangeValue(newValue) {
      /* ✗ BAD */
      this.$emit('input', newValue)
      this.$emit('forbiddenEvent')

      /* ✓ GOOD */
      this.$emit('foo')
      this.$emit('bar')
    }
  }
}
</script>
```

Examples from the ESLint documentation.

## Enable it

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

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

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

## Related rules

- [vue/no-restricted-component-names](https://lintradar.dev/rules/vue/no-restricted-component-names.md): Disallow specific component names
- [vue/no-restricted-props](https://lintradar.dev/rules/vue/no-restricted-props.md): Disallow specific props
- [vue/no-restricted-class](https://lintradar.dev/rules/vue/no-restricted-class.md): Disallow specific classes in Vue components
- [vue/no-restricted-static-attribute](https://lintradar.dev/rules/vue/no-restricted-static-attribute.md): Disallow specific attribute
- [vue/no-restricted-block](https://lintradar.dev/rules/vue/no-restricted-block.md): Disallow specific block
- [vue/no-static-inline-styles](https://lintradar.dev/rules/vue/no-static-inline-styles.md): Disallow static inline `style` attributes

---

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