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

Stop converting empty JSX elements to self-closing elements #6127

Merged
merged 4 commits into from
May 16, 2019

Conversation

duailibe
Copy link
Member

@duailibe duailibe commented May 15, 2019

Closes #5442

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to the CHANGELOG.unreleased.md file following the template.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@duailibe duailibe merged commit eca23e1 into prettier:master May 16, 2019
@duailibe duailibe deleted the jsx-closing-element branch May 16, 2019 18:14
glennreyes added a commit to glennreyes/glennreyes.com that referenced this pull request Jul 5, 2019
@sompylasar
Copy link
Contributor

This PR is said to be merged to prettier:master but prettier:master does not contain these commits and this logic. What happened?

@sompylasar
Copy link
Contributor

sompylasar commented Jul 15, 2019

@duailibe 😮 I don't understand either! I should have uploaded screenshots, it wasn't there when I looked. My brain might have been in some parallel universe or something... I'm very surprised that I missed it somehow. 🤔Maybe I used search that is supposed to find in latest master, maybe its index was not at the latest master, but I also checked the CHANGELOG.md and have not found any mention of this quite significant change in JSX handling, and it's not in CHANGELOG.unreleased.md either. Which version was it released in?

@sompylasar
Copy link
Contributor

OK I think I might have clicked "View file" on the prettier/prettier PR and did not notice that I landed on duailibe/prettier where I replaced the commit hash in the browser address bar with master and landed on duailibe:master which is currently behind prettier:master.
Screen Shot 2019-07-15 at 10 43 07 AM
Screen Shot 2019-07-15 at 10 42 15 AM

@sompylasar
Copy link
Contributor

Found it, according to https://prettier.io/blog/2019/06/06/1.18.0.html#stop-converting-empty-jsx-elements-to-self-closing-elements-6127-by-duailibe it was released in 1.18.0.

The Stop converting empty JSX elements to self-closing elements changelog entry was added to the website blog but not to the CHANGELOG.md file in the repo.

@duailibe
Copy link
Member Author

@sompylasar Changelog for minor releases are blog posts

@Alexzanderk
Copy link

Alexzanderk commented Aug 28, 2019

Holly Molly!!! Why??? How turn on auto-close tag?

@lydell
Copy link
Member

lydell commented Aug 28, 2019

@Alexzanderk You can use the react/self-closing-comp ESLint rule to achieve that. It has autofix!

@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Nov 26, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
4 participants