Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update: Add allowEmptyLines option to vue/multiline-html-element-content-newline rule #759

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

Merged
merged 4 commits into from
Jan 26, 2019

Conversation

ota-meshi
Copy link
Member

@ota-meshi ota-meshi commented Jan 8, 2019

Close #683

This PR adds allowEmptyLines option to vue/multiline-html-element-content-newline rule.

  • allowEmptyLines ... if true, it allows empty lines around content. If you want to disallow multiple empty lines, use no-multiple-empty-lines in combination.
    default false

@ota-meshi ota-meshi self-assigned this Jan 8, 2019
@ota-meshi ota-meshi changed the title Update: Add arrowEmptyLine option to vue/multiline-html-element-content-newline rule Update: Add allowEmptyLine option to vue/multiline-html-element-content-newline rule Jan 8, 2019
@ota-meshi
Copy link
Member Author

@armano2 Thank you for pointing that out 😖

I fixed it.

Copy link
Contributor

@armano2 armano2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, thank you

@@ -87,6 +88,8 @@ This rule enforces a line break before and after the contents of a multiline ele
default `true`
- `ignores` ... the configuration for element names to ignore line breaks style.
default `["pre", "textarea"]`
- `allowEmptyLine` ... if `true`, allow empty line. If disallow multiple empty lines, use [no-multiple-empty-lines] in combination.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation-wise it looks like allowEmptyLines might be a bit more correct option 🤔

As for copy, what do you think about: "... if true, it allows empty lines around content. If you want to disallow multiple empty lines, use ..."?

Also, does the core no-multiple-empty-lines rule work with Vue template by default?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, does the core no-multiple-empty-lines rule work with Vue template by default?

If no-multiple-empty-lines rule is enabled, no-multiple-empty-lines rule also checks in the Vue template.

@ota-meshi
Copy link
Member Author

@michalsnik Thank you for your review.
I fixed option name and copy. so please check again.

@ota-meshi ota-meshi changed the title Update: Add allowEmptyLine option to vue/multiline-html-element-content-newline rule Update: Add allowEmptyLines option to vue/multiline-html-element-content-newline rule Jan 9, 2019
@michalsnik michalsnik merged commit 99e9607 into master Jan 26, 2019
@michalsnik michalsnik deleted the issue683 branch January 26, 2019 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants