-
-
Notifications
You must be signed in to change notification settings - Fork 681
Enforce style of passing an event or part of an event to a method #1611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thank you for the rule proposal! |
Instead of a separate rule, it could maybe be a new option for vue/v-on-function-call. |
This was implemented as the new |
I think you should use the following option:
https://eslint.vuejs.org/rules/v-on-handler-style.html#inline |
@ota-meshi But then it will complain about |
I'm not sure. I thought you prefer the inline format. Isn't it? |
@ota-meshi I want it to be as short as possible so if no parentheses are needed, none should be used. |
I'm not sure which style you prefer. Could you please open a new issue as a feature request for the v-on-handler-style rule and detail your preferred style? |
Please describe what the rule should do:
In Vue you can use
test($event.detail)
as well asevent => test(event.detail)
to achieve the same thing. 1. should be preferred.test($event.detail)
event => test(event.detail)
What category should the rule belong to?
[X] Enforces code style (layout)
[ ] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
The text was updated successfully, but these errors were encountered: