-
-
Notifications
You must be signed in to change notification settings - Fork 680
[vue/valid-template-root] Incorrect detection of root element when using v-if/v-else directives #986
New issue
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
Comments
Thank you for this issue. I checked your issue in the DEMO but could not reproduce it. Can you tell me the version of
The latest version of current |
My bad, typo. I am indeed using The issue is present only on the 6.0.0 version. I have the issue both on my local PC, and my CI integration. |
Thank you for telling me which version you are using. The |
|
If you have a problem with the version of
npm install -D vue-eslint-parser@^6.0.5
+ parser: require.resolve('vue-eslint-parser'), Can you try this? |
Same problem here. Please look at this repo: https://github.com/Miaoxingren/test-nuxt-eslint. Downgrade eslint-plugin-nuxt to @0.4.3 solved the problem. |
Hi @Miaoxingren |
No success. |
@ThibaultVlacich |
I made a simple repro project that showcase the issue: https://github.com/ThibaultVlacich/valid-template-root-eslint-6 The master branch is update to ESLint 6, and the issue is present. There is also an |
Thank you for telling me your repository. I checked the
|
I've been able to temporarily fix my issue by adding this to my package.json (using Yarn), until https://github.com/nuxt/eslint-config is updated : "resolutions": {
"@nuxtjs/eslint-config/eslint-plugin-vue": "^6.0.1"
} |
I close this isssue because I found that the dependency of |
This should fix all medium-and-above severity security issues reported by npm audit. The only remaining issue that cannot be fixed by running `npm upgrade` or `npm audit fix` will be fixed in a follow-up commit. The rule to enforce a single root in vue templates seems to be a bit overzealous. This has already been reported upstream in vuejs/eslint-plugin-vue#971 and was also discussed in vuejs/eslint-plugin-vue#884 and vuejs/eslint-plugin-vue#986 without obvious solution that would be applicable here. Solved by adding a not strictly necessary wrapping span. Change-Id: I3153c0f45ce53704ef2c02d7e2e2e4f6d67e3fc7
* Update Wikibase from branch 'master' to e7ada5fde5f187fef50badd632676363f322691f - Merge "bridge: Upgrade dependencies" - bridge: Upgrade dependencies This should fix all medium-and-above severity security issues reported by npm audit. The only remaining issue that cannot be fixed by running `npm upgrade` or `npm audit fix` will be fixed in a follow-up commit. The rule to enforce a single root in vue templates seems to be a bit overzealous. This has already been reported upstream in vuejs/eslint-plugin-vue#971 and was also discussed in vuejs/eslint-plugin-vue#884 and vuejs/eslint-plugin-vue#986 without obvious solution that would be applicable here. Solved by adding a not strictly necessary wrapping span. Change-Id: I3153c0f45ce53704ef2c02d7e2e2e4f6d67e3fc7
Uh oh!
There was an error while loading. Please reload this page.
Tell us about your environment
Please show your full configuration:
What did you do?
What did you expect to happen?
This code does not trigger an error
What actually happened?
The
vue/valid-template-root
rule throws an error. This exact same code was working on ESLint 5 / eslint-plugin-nuxt 5.2.3, and I'm seeing nothing in the changelog that could explain why it's not working anymore.The text was updated successfully, but these errors were encountered: