Skip to content

Enable ESLint rule vue/no-use-v-if-with-v-for#396

Merged
brianhelba merged 1 commit into
masterfrom
vue-v-if-v-for
Jun 5, 2026
Merged

Enable ESLint rule vue/no-use-v-if-with-v-for#396
brianhelba merged 1 commit into
masterfrom
vue-v-if-v-for

Conversation

@brianhelba
Copy link
Copy Markdown
Collaborator

https://eslint.vuejs.org/rules/no-use-v-if-with-v-for

The change here satisfies the rule, but also removes a somewhat awkward pattern where a v-for was being abused to set a temporary variable. The core issue the lack of a v-let syntax for setting scoped template variables (which is a requested feature). However, in removing the v-for abuse, we are forced to call findVectorProperty(filter) several times in the rendered template, which looks bad, but should be quite cheap (particularly in comparison to the amount of Javascript that's ultimately run in the Vue engine to render any parts of a template).

Copy link
Copy Markdown
Collaborator

@annehaley annehaley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to test the filter features locally and confirmed the behavior is unchanged.

@brianhelba brianhelba merged commit 61bd97f into master Jun 5, 2026
4 checks passed
@brianhelba brianhelba deleted the vue-v-if-v-for branch June 5, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants