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 autofixed JSXElements away in coerce strategy #3370

Merged
merged 1 commit into from Aug 26, 2022

Conversation

sjarva
Copy link
Contributor

@sjarva sjarva commented Aug 26, 2022

Closes #3354

Now, when the jsx-no-leaked-render has {validStrategies: ['coerce']}, the following code is considered as valid and therefore is not autofixed:

{ foo ? <Component1 /> : <Component2 />}

@codecov
Copy link

codecov bot commented Aug 26, 2022

Codecov Report

Merging #3370 (126c452) into master (bb4d1b3) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3370   +/-   ##
=======================================
  Coverage   97.55%   97.55%           
=======================================
  Files         123      123           
  Lines        8928     8929    +1     
  Branches     3256     3256           
=======================================
+ Hits         8710     8711    +1     
  Misses        218      218           
Impacted Files Coverage Δ
lib/rules/jsx-no-leaked-render.js 98.43% <100.00%> (+0.02%) ⬆️

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

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.

Seems great!

@sjarva
Copy link
Contributor Author

sjarva commented Aug 26, 2022

Thanks once again for a quick review! 🤗

@ljharb ljharb merged commit 126c452 into jsx-eslint:master Aug 26, 2022
@sjarva sjarva deleted the no-leaked-render-else branch August 31, 2022 13:15
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.

jsx-no-leaked-render strategies question config question
2 participants