You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because the processor in eslint-plugin-vue does not modify the vue file when processing the file, while eslint-plugin-vue's processor extracts just the <script> element.
This then has a knock-on effect in eslint-plugin-prettier because it doesn't know what parser it should use (if someone is using eslint-plugin-vue then it is acting upon a full vue file so it should use the vue parser, if someone is using eslint-plugin-html it is acting upon a JS fragment so it should use the babylon parser).
I feel the easiest approach for interoperability is to remove support for .vue files and to direct people to use eslint-plugin-vue if they want to lint their vue files. This has the side effect of offering fuller linting for the vue file as it supports linting the <template> and <style> tags in addition to the <script> tag
The text was updated successfully, but these errors were encountered:
This is a known issue, and both plugin document it in its README (see). The only thing I can do to go further is to remove the .vue from the default extensions.
Thanks for that context, I missed that section in your readme.
The only thing I can do to go further is to remove the .vue from the default extensions.
I think that would be best. Doing so in v5 as a breaking change makes most sense to me and it sounds like you're already planning a v5 release anyway. As it currently stands it is not possible for somebody to use eslint-plugin-vue >=3.0.0 and eslint-plugin-html at the same time without losing the linting of the <template> and <style> sections.
Removing .vue from the default extensions would allow you to update the README to say something like:
eslint-plugin-vue v3.0.0 and later versions are incompatible with eslint-plugin-html versions earlier than v5.0.0. To ensure eslint-plugin-vue functionality is not affected you must use eslint-plugin-html v5.0.0 or later.
eslint-plugin-html and eslint-plugin-vue conflict with each other as per https://github.com/vuejs/eslint-plugin-vue/blob/562fde184a7a37f551fc98711a0bb4233c749606/README.md#why-doesnt-it-work-on-vue-file
This is because the processor in eslint-plugin-vue does not modify the vue file when processing the file, while eslint-plugin-vue's processor extracts just the <script> element.
This then has a knock-on effect in eslint-plugin-prettier because it doesn't know what parser it should use (if someone is using eslint-plugin-vue then it is acting upon a full vue file so it should use the vue parser, if someone is using eslint-plugin-html it is acting upon a JS fragment so it should use the babylon parser).
I feel the easiest approach for interoperability is to remove support for
.vue
files and to direct people to use eslint-plugin-vue if they want to lint their vue files. This has the side effect of offering fuller linting for the vue file as it supports linting the<template>
and<style>
tags in addition to the<script>
tagThe text was updated successfully, but these errors were encountered: