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 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

@rafbgarcia rafbgarcia commented Dec 17, 2019

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

@ljharb
ljharb approved these changes Dec 27, 2019
Copy link
Collaborator

@ljharb ljharb left a comment

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 rafbgarcia:fix-other-curly-brace-presence-edge-cases branch from 94e608d to 7f87310 Dec 27, 2019
@ljharb ljharb merged commit 7f87310 into yannickcr:master Dec 27, 2019
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.008%) to 97.527%
Details
@rafbgarcia rafbgarcia deleted the rafbgarcia:fix-other-curly-brace-presence-edge-cases branch Mar 2, 2020
@rafbgarcia rafbgarcia restored the rafbgarcia:fix-other-curly-brace-presence-edge-cases branch Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants