-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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-target-blank
: allow ternaries with literals
#3464
[Fix] jsx-no-target-blank
: allow ternaries with literals
#3464
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems pretty good, thanks
b91124c
to
8e55e8d
Compare
@akulsr0 i've freshly rebased this, but there's failing tests. |
I have moved the following testcase (which was failing) to valid, since it is a valid scenario. <a href={href} target={isExternal ? "_blank" : undefined} rel={isExternal ? "noopener noreferrer" : undefined} /> |
Codecov Report
@@ Coverage Diff @@
## master #3464 +/- ##
=======================================
Coverage 97.54% 97.54%
=======================================
Files 128 128
Lines 9110 9118 +8
Branches 3320 3321 +1
=======================================
+ Hits 8886 8894 +8
Misses 224 224
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
590bde4
to
5efd774
Compare
jsx-no-target-blank
support for conditionalsjsx-no-target-blank
: allow ternaries with literals
Fixes #3462
I have added the fix for support of conditionals in
jsx-no-target-blank
rule.But not sure about one test case and it's failing. Would need some help on that.
As per the test case this is expected to be invalid. I am not sure if this should be invalid or not?