We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
no-use-v-if-with-v-for
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
Please describe what the rule should do:
This rule warns never use v-if on the same element as v-for.
Style guide: https://vuejs.org/v2/style-guide/#Avoid-v-if-with-v-for-essential
What category of rule is this? (place an "X" next to just one item)
[X] Enforces code style [ ] Warns about a potential error [ ] Suggests an alternate way of doing something [ ] Other (please specify:)
Provide 2-3 code examples that this rule will warn about:
<ul> <li v-for="user in users" v-if="user.isActive" :key="user.id" > {{ user.name }} </li> </ul>
Why should this rule be included?
This rule is stated in the Style guide as ESSENTIAL. It is similar to vue/no-confusing-v-for-v-if, but the content of code examples is not warned.
vue/no-confusing-v-for-v-if
code examples
I confirmed issues, but I could not find duplicate rules. I'm sorry if it was duplicated.
The text was updated successfully, but these errors were encountered:
Thank you for this issue.
Looks good to me. Maybe the existing vue/no-confusing-v-for-v-if rule should be deprecated after we add vue/no-use-v-if-with-v-for rule.
vue/no-use-v-if-with-v-for
cc: @chrisvfritz @michalsnik
Sorry, something went wrong.
Thank you for considering the proposal !!
I like it too. 🙂
I like it too. 🙂 I do not like(我不喜欢)
No branches or pull requests
Please describe what the rule should do:
This rule warns never use v-if on the same element as v-for.
Style guide:
https://vuejs.org/v2/style-guide/#Avoid-v-if-with-v-for-essential
What category of rule is this? (place an "X" next to just one item)
[X] Enforces code style
[ ] Warns about a potential error
[ ] Suggests an alternate way of doing something
[ ] Other (please specify:)
Provide 2-3 code examples that this rule will warn about:
Why should this rule be included?
This rule is stated in the Style guide as ESSENTIAL.
It is similar to
vue/no-confusing-v-for-v-if
, but the content ofcode examples
is not warned.I confirmed issues, but I could not find duplicate rules.
I'm sorry if it was duplicated.
The text was updated successfully, but these errors were encountered: