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

[Docs] Update jsx-no-target-blank.md #3818

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

brunocoelho
Copy link
Contributor

  • Add missing ponctuation.
  • Rewrite a couple of sentences.

* Add missing ponctuation.
* Rewrite a couple of sentences.
Copy link

codecov bot commented Sep 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.63%. Comparing base (07503b7) to head (7b46854).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3818      +/-   ##
==========================================
- Coverage   97.77%   97.63%   -0.14%     
==========================================
  Files         135      135              
  Lines        9741     9741              
  Branches     3558     3558              
==========================================
- Hits         9524     9511      -13     
- Misses        217      230      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -6,8 +6,8 @@

<!-- end auto-generated rule header -->

When creating a JSX element that has an `a` tag, it is often desired to have the link open in a new tab using the `target='_blank'` attribute. Using this attribute unaccompanied by `rel='noreferrer'`, however, is a severe security vulnerability (see [noreferrer docs](https://html.spec.whatwg.org/multipage/links.html#link-type-noreferrer) and [noopener docs](https://html.spec.whatwg.org/multipage/links.html#link-type-noopener) for more details)
This rules requires that you accompany `target='_blank'` attributes with `rel='noreferrer'`.
When creating a JSX element with an `a` tag, the link is often desired to open in a new tab using the `target='_blank'` attribute. Using this attribute unaccompanied by `rel='noreferrer'`, however, is a severe security vulnerability (see [noreferrer docs](https://html.spec.whatwg.org/multipage/links.html#link-type-noreferrer) and [noopener docs](https://html.spec.whatwg.org/multipage/links.html#link-type-noopener) for more details).
Copy link
Member

Choose a reason for hiding this comment

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

"the link is often desired to open" reads wrong to me; the "it" isn't referring to "the link" but to "a generic person"

If you do not have any external links or forms, you can disable this rule.
You can disable this rule if you do not have any external links or forms.
Copy link
Member

Choose a reason for hiding this comment

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

"If x, you can disable this rule" is the form we most typically use in all the rule docs.

@ljharb ljharb marked this pull request as draft September 12, 2024 06:41
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.

2 participants