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/multiline-html-element-content-newline rule #551

Merged
merged 3 commits into from
Aug 13, 2018

Conversation

ota-meshi
Copy link
Member

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

It is related to #415.

schema: [{
type: 'object',
properties: {
'ignoreNames': {
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps we should stick to the convention and use simple ignore property? I don't have strong preference though

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for review!
Name was unnecessary.
Since the indent rule is named ignores, we also name it ignores.

</div>
</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.

I find closing bracket and opening bracket a little confusing. What do you think about instead using opening tag and closing tag?
So for example:

Expected 1 line break after opening tag (`<div>`), but no line breaks found.

and

Expected 1 line break before closing tag (`</div>`), but no line breaks found.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you for review!
The message you suggested is very easy to understand.

@ota-meshi
Copy link
Member Author

@michalsnik 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.

Awesome! ⭐️

@michalsnik michalsnik merged commit e53bfd3 into master Aug 13, 2018
@michalsnik michalsnik deleted the add-rule/multiline-html-element-content-newline branch August 13, 2018 23:22
@armano2
Copy link
Contributor

armano2 commented Nov 13, 2018

sadly i found issue in this rule: #662

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.

3 participants