-
-
Notifications
You must be signed in to change notification settings - Fork 697
Fix: no-invalid-template-root
has false positive about empty templates (fixes #41)
#44
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
Conversation
47dc4ba
to
1e300db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty template seems also bad since users can simply skip the template section. I would like to see exactly one element warning back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think template root should be empty only if it is an external template reference.
Related: vuejs/vetur#272
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HerringtonDarkholme Could you know where the document about <template src="foo.html">
is? User guide seems to not say about <template src="foo.html">
. Also HTML spec does not have the src
attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is listed in vue-loader's spec. http://vue-loader.vuejs.org/en/start/spec.html#src-imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HerringtonDarkholme Thank you!
cb81b73
to
d8dd93d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, let's see how it works in practice. Merge when you're ready.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about amending this message to be: The template root with 'src' attribute is required to be empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's out of the scope of this task, but if you're already on it maybe you could change if
to in
. We can also do a separate PR with copy updates though, so whatever..
Thank you for corrections!
Fixes #41.
This PR removes the warnings about empty templates.