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

[New] Add vue/singleline-html-element-content-newline rule #552

Merged
merged 2 commits into from
Aug 13, 2018

Conversation

ota-meshi
Copy link
Member

This PR adds vue/singleline-html-element-content-newline rule.
This implements rule proposed in #547 (comment)

It is related to #415.

}
```

- `strict` ... if false, if there are no attributes on the element, this rule allows having contents in one line.
Copy link
Member

Choose a reason for hiding this comment

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

What do you think about renaming strict option that I proposed earlier to something a bit more descriptive, like ignoreWhenNoAttribures?

- `ignoreWhenNoAttributes` ... allows having contents in one line, when given element has no attributes. default `true`

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that the name ignoreWhenNoAttribures is easy to understand and very good!

</template>
`,
errors: [
'Expected 1 line break after closing bracket of the "div" element, but no line breaks found.',
Copy link
Member

Choose a reason for hiding this comment

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

Same question as in the other rule, what do you think about using opening tag and closing tag phrases?

@ota-meshi
Copy link
Member Author

@michalsnik Thank you for the review!
I changed it, so please check again.

Copy link
Member

@michalsnik michalsnik left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@michalsnik michalsnik merged commit cae7d51 into master Aug 13, 2018
@michalsnik michalsnik deleted the add-rule/singleline-html-element-content-newline branch August 13, 2018 23:41
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

Successfully merging this pull request may close these issues.

2 participants