Open KaelWD opened 11 months ago
Why do you want to use @update:model-value=""
? It doesn't do anything, does it?
It does whatever the component wants it to do, in this case it stops the input from keeping its own internal state. This is pretty common with other components too, like <v-list-item @click="" />
adds a hover effect.
When you do this props.onClick
is just an empty function () => {}
I'm not sure whether it should be allowed as a default. But I can see your use case. What do you think about an allowEmpty: true
parameter (false by default)?
I don't really like how many configuration flags this plugin has added over time, most of which have somewhat puzzling defaults. If the intention of this rule is to prevent errors then empty events should be allowed, because they either do nothing or are intentional. If the intention is to prevent mistakes then it should still be allowed by default because sometimes it isn't a mistake.
Checklist
Tell us about your environment
Please show your full configuration:
What did you do?
What did you expect to happen? Nothing
What actually happened?
Repository to reproduce this issue
This is simple enough I don't think it needs one.
@update:model-value
should be an error because vue doesn't like it either, but@update:model-value=""
actually works fine and just throws an eslint warning for no reason.