Skip to content

Conversation

ota-meshi
Copy link
Member

Even if you declare it in props, a warning message and fallthrough can be stopped, so I add an option to allow this.
https://github.com/vuejs/vue-next/blob/00ab9e2e8506d108958895cda4e977dfb16b53f9/packages/runtime-core/src/componentEmits.ts#L50

By default this option remains disabled.

Even if you declare it in props, a warning message and fallthrough can be stopped, so I add an option to allow this.
https://github.com/vuejs/vue-next/blob/00ab9e2e8506d108958895cda4e977dfb16b53f9/packages/runtime-core/src/componentEmits.ts#L50

By default this option remains disabled.
@ota-meshi ota-meshi self-assigned this Jul 21, 2020
@ota-meshi ota-meshi merged commit 872c0b8 into master Jul 31, 2020
@ota-meshi ota-meshi deleted the ignore-prop-require-explicit-emits branch July 31, 2020 11:04
@Robo-Rin
Copy link

Robo-Rin commented Jul 24, 2023

@ota-meshi This doesn't seem to account for custom events in kebab-case declared as a prop, do you think we should add this to support the workaround mentioned here:
vuejs/core#5220 (comment)

For example currently this does work but is ugly and violates vue/prop-name-casing:

props: ['onCustom-event'],
// ...
this.$emit('custom-event')

So it would be great if we can do:

props: ['onCustomEvent'],
// ...
this.$emit('custom-event')

Robo-Rin added a commit to Robo-Rin/eslint-plugin-vue that referenced this pull request Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants