Same rule has different priority in style guide and in eslint-plugin-vue
See original GitHub issuePlease describe what the rule should do:
Provide a warning when using v-if on the same element as v-for.
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:
<PostCard
v-for="page in pages"
v-if="isVisiblePost(page)"
:key="page.key"
:page="page"
:showContent="false"
:showLink="true"
/>
<ul>
<li
v-for="user in users"
v-if="shouldShowUsers"
:key="user.id"
>
{{ user.name }}
<li>
</ul>
Why should this rule be included
- Style guide has provided some reasons. This rule’s priority is essential, which is the same priority as rule vue/valid-v-for
- Because of unknown reason, I found out that if I use
v-ifwithv-for, safari will have some wrong behave. I can bypass it if I follow style guide’s suggestion (see link above). https://github.com/vuejs/vuepress/issues/678
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Available rules - eslint-plugin-vue
Rule ID Description
vue/multi‑word‑component‑names require component names to be always multi‑word...
vue/no‑arrow‑functions‑in‑watch disallow using arrow functions to define watcher...
vue/no‑computed‑properties‑in‑data disallow accessing computed properties in data...
Read more >Configuration Files - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >@vue/eslint-plugin - npm
The most rules of eslint-plugin-vue require vue-eslint-parser to check <template> ASTs. Make sure you have one of the following settings in your ...
Read more >ESLint and Prettier with Vite and Vue.js 3 - Vue School Blog
Learn how to set up Prettier and ESLint with Vite for your next Vue 3 ... to the 3 different priorities in the...
Read more >Vue.js style guide - GitLab Docs
We default to eslint-vue-plugin, with the plugin:vue/recommended . Check the rules for more documentation. Basic Rules. The service has its own file; The...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Updated on master
ok, I will reopen this issue and change the title just for reminding.