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

[New] jsx-no-target-blank: add fixer #2862

Merged
merged 1 commit into from Jan 8, 2021

Conversation

Nokel81
Copy link
Contributor

@Nokel81 Nokel81 commented Nov 25, 2020

No description provided.

lib/rules/jsx-no-target-blank.js Show resolved Hide resolved
lib/rules/jsx-no-target-blank.js Outdated Show resolved Hide resolved
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.

Almost there :-)

lib/rules/jsx-no-target-blank.js Outdated Show resolved Hide resolved
lib/rules/jsx-no-target-blank.js Outdated Show resolved Hide resolved
tests/lib/rules/jsx-no-target-blank.js Outdated Show resolved Hide resolved
tests/lib/rules/jsx-no-target-blank.js Outdated Show resolved Hide resolved
tests/lib/rules/jsx-no-target-blank.js Outdated Show resolved Hide resolved
errors: defaultErrors
}, {
code: '<a target={"_blank"} href={"//example.com"} rel={"noopenernoreferrernoreferrernoreferrernoreferrernoreferrer"}></a>',
output: '<a target={"_blank"} href={"//example.com"} rel={"noopener noreferrer"}></a>',
Copy link
Member

Choose a reason for hiding this comment

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

it's fine to keep it here since the original was both a string and had curly braces

@ljharb ljharb changed the title add fixer for the jsx-no-target-blank rule [New] jsx-no-target-blank: add fixer Dec 23, 2020
@Nokel81 Nokel81 requested a review from ljharb December 23, 2020 17:56
@ljharb
Copy link
Member

ljharb commented Dec 30, 2020

@Nokel81 ok! i think this time i've got it down to 4 failures, not just in older eslint versions: namely, that the fixer is fixing the code in the spread attribute case. If CI ends up showing those same 4 failures, then fixing that would be the last step to landing this.

@ljharb
Copy link
Member

ljharb commented Dec 30, 2020

Please mark the PR as ready for review once either the tests are passing or you're stuck again (hopefully the former :-p )

@ljharb ljharb marked this pull request as draft December 30, 2020 00:34
@Nokel81 Nokel81 force-pushed the add-fixer-no-target-blank branch 2 times, most recently from b914d29 to 26a9307 Compare January 7, 2021 19:07
@Nokel81 Nokel81 marked this pull request as ready for review January 7, 2021 19:11
@Nokel81
Copy link
Contributor Author

Nokel81 commented Jan 7, 2021

@ljharb All tests are passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants