-
-
Notifications
You must be signed in to change notification settings - Fork 681
Rule proposal: vue/padding-line-between-blocks #855
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
Comments
+1 for this rule! Additionally, I'd like to see it implemented within any given element in a Vue template, like so:
|
@nathanchase That should definitely go in another rule as it there are many ways of configuring it. I even wonder if there isn't already something |
I've looked, and surprisingly can't find anything within ESLint that applies specifically to ensuring newlines between elements in a Vue template. |
➕ for the rule addition AND to separate @nathanchase's suggestion to another rule, as they're not the same thing 😸 but i also could not find any rules to satisfy either |
This rule is similar to @nathanchase's suggestion and would make a good model for the new rule |
same for script options, please 🙏
|
Please also pad the root tag itself --> <!-- GOOD -->
<template>
<div>
<div>Demo 1</div>
<div>Demo 2</div>
</div>
</template> <!-- BAD -->
<template>
<div>
<div>Demo1</div>
<div>Demo2</div>
</div>
</template> |
Is there an analogous option for script methods? I'm badlyyyyyy in need of this 😄 |
Please describe what the rule should do:
Enforce empty lines between blocks (
template
,script
,style
, and any other root level block)What category should the rule belong to?
Provide 2-3 code examples that this rule should warn about:
<!-- BAD --> <template> <div></div> </template> <script> export default {} </script> <custom></custom>
<!-- GOOD --> <template> <div></div> </template> <script> export default {} </script> <custom></custom>
Additional context
Having empty lines between blocks improves readability and allows quick navigation per paragraph (
{
/}
in Vim)similar to https://eslint.org/docs/rules/padding-line-between-statements#rule-details
The text was updated successfully, but these errors were encountered: