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

Add selfClosingTag option to vue/html-closing-bracket-newline #2346

Merged
merged 8 commits into from
Dec 27, 2023

Conversation

mussinbenarbia
Copy link
Contributor

@mussinbenarbia mussinbenarbia commented Dec 4, 2023

Resolves #1794

The implementation follows @ota-meshi's suggestion of adding a selfClosingTag option to the html-closing-bracket-newline rule.

It keeps compatibility by falling back to the previous behavior if the user does not specify the new option.

@mussinbenarbia mussinbenarbia changed the title Self closing bracket newline Add selfClosingTag option to vue/html-closing-bracket-newline Dec 4, 2023
@mussinbenarbia
Copy link
Contributor Author

I plan to update the docs once the implementation is confirmed/approved 🙇 Should I mark the PR as draft when I do this? Or should I let the maintainers do it?

@FloEdelmann
Copy link
Member

FloEdelmann commented Dec 5, 2023

Should I mark the PR as draft when I do this?

Yes please; it makes it clear that the PR is not intended to be complete yet.

@FloEdelmann FloEdelmann marked this pull request as draft December 5, 2023 07:40
Copy link
Member

@FloEdelmann FloEdelmann 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 overall. Can you please improve the test cases with my suggestions and check if they still pass? Please also add the documentation for the next review 🙂

lib/rules/html-closing-bracket-newline.js Outdated Show resolved Hide resolved
tests/lib/rules/html-closing-bracket-newline.js Outdated Show resolved Hide resolved
tests/lib/rules/html-closing-bracket-newline.js Outdated Show resolved Hide resolved
@mussinbenarbia
Copy link
Contributor Author

@FloEdelmann Oops, I re-requested review before finishing the docs. I'm on them right now

@mussinbenarbia
Copy link
Contributor Author

@FloEdelmann Docs updated. I tried to follow the same structure as https://eslint.vuejs.org/rules/html-self-closing Let me know if that looks OK!

@mussinbenarbia mussinbenarbia marked this pull request as ready for review December 7, 2023 13:58
This commit also adds a missing whitespace
Copy link
Member

@FloEdelmann FloEdelmann 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 to me now. Thanks for your contribution! :)

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@ota-meshi ota-meshi merged commit 591c7af into vuejs:master Dec 27, 2023
16 checks passed
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.

vue/html-self-closing-bracket-newline
3 participants