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

react/jsx-no-target-blank: change allowReferrer default value #3672

Open
2 tasks done
oliviertassinari opened this issue Jan 6, 2024 · 1 comment
Open
2 tasks done

Comments

@oliviertassinari
Copy link
Contributor

oliviertassinari commented Jan 6, 2024

Is there an existing issue for this?

  • I have searched the existing issues and my issue is unique
  • My issue appears in the command-line and not only in the text editor

Description Overview

Today allowReferrer default value is false. This is because the rule is required for Internet Explorer (IE). https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md#rule-options

The problem with noreferrer is that it hides the referrer information to the site you link to, which can create problems (e.g. commercial traffic arrangements). But at the root, it's not the default that the HTML spec implemented, it makes eslint opinionated.

At one point in the future, this allowReferrer: false default will no longer make sense because Internet Explorer use would be so low that the cons outweigh the pros. Hence this issue is here to keep track of this.

Expected Behavior

eslint-plugin-react version

7.33.2

eslint version

8.56.0

node version

v18.18.2

@ljharb
Copy link
Member

ljharb commented Jan 6, 2024

The safe default value of this option is still false, because that's the safest one, so I don't anticipate ever wanting to change it here. Certainly most downstream users will be able to set it to true if they want, but since the vast majority of users wouldn't want to expose user information because they wouldn't have commercial agreements, it's unlikely to be that valuable a change except at the application level.

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

No branches or pull requests

2 participants