Skip to content

Rule proposal: html comment content newline #592

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

Closed
ota-meshi opened this issue Oct 1, 2018 · 1 comment · Fixed by #755
Closed

Rule proposal: html comment content newline #592

ota-meshi opened this issue Oct 1, 2018 · 1 comment · Fixed by #755

Comments

@ota-meshi
Copy link
Member

Please describe what the rule should do:

Enforce newline before and after HTML comment content.

What category of rule is this? (place an "X" next to just one item)

[x] Enforces code style
[ ] Warns about a potential error
[ ] Suggests an alternate way of doing something
[ ] Other (please specify:)

Provide 2-3 code examples that this rule will warn about:

<!-- multiline
comment -->
<!--

Too many newlines

-->

Why should this rule be included in ESLint (instead of a plugin)?

I think it should be included for the beauty of the Vue source code.

@ota-meshi
Copy link
Member Author

I think it would be nice if there are rules that can keep the next style guide.

https://www.w3schools.com/html/html5_syntax.asp

HTML Comments

Short comments should be written on one line, like this:

<!-- This is a comment -->

Comments that spans more than one line, should be written like this:

<!-- 
  This is a long comment example. This is a long comment example.
  This is a long comment example. This is a long comment example.
-->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants