Skip to content

New: html-closing-bracket-spacing rule (fixes #229) #312

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 5 commits into from
Jan 2, 2018

Conversation

mysticatea
Copy link
Member

Fixes #229.

This PR adds vue/html-closing-bracket-spacing rule. This is the spacing style version of #190. It requires or disallows a space before tag's closing brackets.

@mysticatea mysticatea added this to the v4.1.0 milestone Dec 31, 2017
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.

Two minor suggesions. Good job @mysticatea 👍


- :wrench: The `--fix` option on the [command line](http://eslint.org/docs/user-guide/command-line-interface#fix) can automatically fix some of the problems reported by this rule.

This rule enforces space style before `>` of tags.
Copy link
Member

Choose a reason for hiding this comment

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

This rule enforces consistent spacing style before closing brackets > of elements.

{
code: '<template>\n <div >\n </div >\n <div/>\n</template>',
errors: [
{ message: "Expected no space before '>', but found.", line: 2 },
Copy link
Member

Choose a reason for hiding this comment

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

It would be also good to check whether column of the > is properly reported.

@mysticatea
Copy link
Member Author

I updated this PR.

As a note, this is the range of warnings:

image

@michalsnik michalsnik merged commit 7faf1a4 into master Jan 2, 2018
@michalsnik
Copy link
Member

Brilliant 🚀

@michalsnik michalsnik deleted the html-closing-bracket-spacing/new branch January 2, 2018 23:57
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.

2 participants