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
What rule do you want to change?
vue/multiline-html-element-content-newline
Does this change cause the rule to produce more or fewer warnings?
Fewer if new option set
How will the change be implemented? (New option, new default behavior, etc.)?
New option, or extension to the ignores option. Either a boolean option, default false, called something like allowHTMLComments, or a token such as HTMLComments added to the list of possible ignores values. Note I'm not sure about the latter, as my understanding is that ignores list is looking for the element names before the subsequent content without newline (e.g. the <div>), where as we'd like to allow multiline for any element, providing that the subsequent element is a comment.
Please provide some example code that this change will affect:
To enable this to be Good:
<divclass="something"> <!-- or use class="other" -->
<Component />
</div>
What does the rule currently do for this code?
Currently, it produces the error vue/multiline-html-element-content-newline – Expected 1 line break after opening tab ('<div>'), but no line breaks found.
What will the rule do after it's changed?
Produce no errors / warnings with same-line HTML comments
Additional context
This is a common pattern for our JS code, and we'd like to be able to use the same kind of inline comments within the template:
constmeaning=42// obviously
The text was updated successfully, but these errors were encountered:
dsl101
changed the title
vue/multiline-html-element-content-newline option to ignore comments
Rule Proposal: vue/multiline-html-element-content-newlineMay 17, 2023
FloEdelmann
changed the title
Rule Proposal: vue/multiline-html-element-content-newline
Ignore HTML comments in vue/multiline-html-element-content-newlineMay 17, 2023
What rule do you want to change?
vue/multiline-html-element-content-newline
Does this change cause the rule to produce more or fewer warnings?
Fewer if new option set
How will the change be implemented? (New option, new default behavior, etc.)?
New option, or extension to the
ignores
option. Either a boolean option, defaultfalse
, called something likeallowHTMLComments
, or a token such asHTMLComments
added to the list of possibleignores
values. Note I'm not sure about the latter, as my understanding is that ignores list is looking for the element names before the subsequent content without newline (e.g. the<div>
), where as we'd like to allow multiline for any element, providing that the subsequent element is a comment.Please provide some example code that this change will affect:
To enable this to be Good:
What does the rule currently do for this code?
Currently, it produces the error
vue/multiline-html-element-content-newline – Expected 1 line break after opening tab ('<div>'), but no line breaks found.
What will the rule do after it's changed?
Produce no errors / warnings with same-line HTML comments
Additional context
This is a common pattern for our JS code, and we'd like to be able to use the same kind of inline comments within the template:
The text was updated successfully, but these errors were encountered: