Skip to content

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

Open
brianhelba wants to merge 1 commit into
masterfrom
vue-v-if-v-for
Open

Enable ESLint rule vue/no-use-v-if-with-v-for#396
brianhelba wants to merge 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).

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.

1 participant