Skip to content
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

Feature/support for fragments #1038

Merged
merged 2 commits into from Mar 14, 2020

Conversation

przemkow
Copy link
Contributor

Hi! After @sodatea 's tweet, I decided to try my first contribution to Vuejs project :) This PR is based on the previous implementation of vue/valid-template-root if you think that something is missing or should be changed I will try to do it as soon as possible!


Add support for Vue 3 fragments.

Relates to:
#1035

Scope:

  • vue/valid-template-root: Remove a single root element check. New implementation checks two different cases:

    • When <template> does not have src attribute, it needs to contain at least one element
    • When <template> have src attribute it needs to be empty
  • vue/no-multiple-template-root: New rule-based on previous vue/valid-template-root implementation used to check if template contains single root element (implemented for Vue 2 backward compatibility)

Clarification needed:
How can we differentiate "essential" rules for Vue 2 from the one for Vue 3? Currently vue/no-multiple-template-root is added to configs/essential.js but I'm not sure how to do it correctly to do not affect build for Vue 3.

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, looks good to me! Thank you!

@ota-meshi
Copy link
Member

I think creating categories for Vue3 is a separate task.

@ota-meshi ota-meshi merged commit d8e728a into vuejs:master Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants