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

Fix curly-brace-presence edge cases #2523

Merged

Conversation

rafbgarcia
Copy link
Contributor

@rafbgarcia rafbgarcia commented Dec 13, 2019

Formats texts that contain line breaks

Fixes #2524

The example below was not being handled.

<Component>
  text
</Component>

Handle HTML entities

Fixes #2522

  • Ignores HTML entities
  • Correctly handle their output

@rafbgarcia
Copy link
Contributor Author

rafbgarcia commented Dec 13, 2019

@ljharb what do you think of this?

About the HTML entities, I did what I thought would be the best solution, I would not use that lint if it replaced &nbsp; with {"&nbsp;"} because my code would break.

Please let me know if you the fixes on separate PRs.

@rafbgarcia
Copy link
Contributor Author

@ljharb kind ping as, again, this bug prevents using this lint which is one of the best. I appreciate your help, thank you!

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

I'll make the changes while rebasing this.

lib/rules/jsx-curly-brace-presence.js Outdated Show resolved Hide resolved
lib/rules/jsx-curly-brace-presence.js Outdated Show resolved Hide resolved
@ljharb ljharb force-pushed the fix-other-curly-brace-presence-edge-cases branch from 94e608d to 7f87310 Compare December 27, 2019 00:03
@ljharb ljharb merged commit 7f87310 into jsx-eslint:master Dec 27, 2019
@rafbgarcia rafbgarcia deleted the fix-other-curly-brace-presence-edge-cases branch March 2, 2020 00:51
@rafbgarcia rafbgarcia restored the fix-other-curly-brace-presence-edge-cases branch March 2, 2020 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants