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

Rule proposal: newline between same level html elements #741

Closed
1 of 4 tasks
kailniris opened this issue Dec 29, 2018 · 2 comments
Closed
1 of 4 tasks

Rule proposal: newline between same level html elements #741

kailniris opened this issue Dec 29, 2018 · 2 comments

Comments

@kailniris
Copy link

Please describe what the rule should do:

Enforce newline between same level HTML elements.

What category should the rule belong to?

  • 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 should warn about:

<template>
  <div>content</div>

  <CustomElement />

  <div>
    <div>content</div>

    <CustomElement />
  </div>   
</template>

Additional context

I think this really helps code readability. Maybe for some reasons this can be a bad practice. Ether way there shell be a rule to enforce or prevents this.

@michalsnik
Copy link
Member

Hi @kailniris Thank you for this proposition. However this will never be white or black and in this case I think we should just follow common sense. Using one or the other approach exclusively might produce actually worse code. I'll leave this open for now, as I would love to see what others might think about it. But nevertheless it would most likely never go to any category, but remain uncategorized instead.

@FloEdelmann
Copy link
Member

FloEdelmann commented May 16, 2023

This should now be possible with the vue/padding-line-between-tags rule (added in #1966).

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

No branches or pull requests

3 participants