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] jsx-no-leaked-render: autofix nested "&&" logical expressions #3353

Merged

Conversation

hduprat
Copy link
Contributor

@hduprat hduprat commented Aug 10, 2022

A partial fix to #3323

I welcome suggestions and help if you think it does not improve performance 🙂

@codecov
Copy link

codecov bot commented Aug 10, 2022

Codecov Report

Merging #3353 (cac3838) into master (b7f388b) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3353   +/-   ##
=======================================
  Coverage   97.54%   97.54%           
=======================================
  Files         123      123           
  Lines        8867     8873    +6     
  Branches     3242     3244    +2     
=======================================
+ Hits         8649     8655    +6     
  Misses        218      218           
Impacted Files Coverage Δ
lib/rules/jsx-no-leaked-render.js 98.41% <100.00%> (+0.16%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@Belco90 Belco90 left a comment

Choose a reason for hiding this comment

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

LGTM! Could you add the scenarios reported in #3323 as valid tests? So it's clear that those cases have been fixed.

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.

Looks great, but could we add the test case from the OP of the linked issue?

lib/rules/jsx-no-leaked-render.js Outdated Show resolved Hide resolved
@hduprat hduprat force-pushed the jsx-no-leaked-render/fix-faulty-autofix branch from de4f91d to 0c510e9 Compare August 12, 2022 12:08
@ljharb ljharb force-pushed the jsx-no-leaked-render/fix-faulty-autofix branch 2 times, most recently from 91fb560 to d608181 Compare August 12, 2022 17:53
@ljharb ljharb force-pushed the jsx-no-leaked-render/fix-faulty-autofix branch from d608181 to cac3838 Compare August 12, 2022 17:55
@ljharb ljharb merged commit cac3838 into jsx-eslint:master Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants