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: label-spacing #897

Closed
1 of 4 tasks
MunMunMiao opened this issue May 24, 2019 · 1 comment
Closed
1 of 4 tasks

Rule Proposal: label-spacing #897

MunMunMiao opened this issue May 24, 2019 · 1 comment

Comments

@MunMunMiao
Copy link

MunMunMiao commented May 24, 2019

Please describe what the rule should do:
Increase readability by adding tag spacing

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:

  • close{before: false, after: false}
<!-- bad -->
<template>
    <div class="header"></div>
    <div class="content"></div>
    <div class="footer"></div>
</template>
  • open{before: true, after: true}
<!-- good -->
<template>
    <!-- spacing -->
    <div class="header"></div>
    <!-- spacing -->
    <div class="content"></div>
    <!-- spacing -->
    <div class="footer"></div>
    <!-- spacing -->
</template>
  • only before{before: true, after: false}
<template>
    <!-- spacing -->
    <div class="header"></div>
    <!-- spacing -->
    <div class="content"></div>
    <!-- spacing -->
    <div class="footer"></div>
</template>
  • only after{before: false, after: true}
<template>
    <div class="header"></div>
    <!-- spacing -->
    <div class="content"></div>
    <!-- spacing -->
    <div class="footer"></div>
    <!-- spacing -->
</template>
  • more examples
<template>
    <!-- spacing -->
    <div class="header">
        <!-- spacing -->
        <div class="logo"></div>
        <!-- spacing -->
    </div>
    <!-- spacing -->
    <div class="content">
        <!-- spacing -->
        <div class="left"></div>
        <!-- spacing -->
        <div class="right"></div>
        <!-- spacing -->
    </div>
    <!-- spacing -->
    <div class="footer">
        <!-- spacing -->
        <span>XXXXX(at)gmail.com</span>
        <!-- spacing -->
    </div>
    <!-- spacing -->
</template>

Additional context

@MunMunMiao MunMunMiao changed the title label-spacing Rule Proposal: label-spacing May 24, 2019
@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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants