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

Should enforceDynamicLinks be react/jsx-no-target-blank? #1986

Closed
atomcorp opened this issue Sep 17, 2018 · 4 comments
Closed

Should enforceDynamicLinks be react/jsx-no-target-blank? #1986

atomcorp opened this issue Sep 17, 2018 · 4 comments

Comments

@atomcorp
Copy link
Contributor

Maybe I'm missing something, but for the jsx-no-target-blank rule it says:

There are two main options for the rule:

{"enforceDynamicLinks": "always"} enforces the rule if the href is a dynamic link (default)
{"enforceDynamicLinks": "never"} does not enforce the rule if the href is a dynamic link

This didn't do anything for me. "react/jsx-no-target-blank": 2, works fine, but it wasn't really clear if that is indeed what you're meant to do.

Thanks

@atomcorp
Copy link
Contributor Author

FWIW I'm using:

"eslint": "^5.6.0",
"eslint-plugin-react": "^7.11.1",

@ljharb
Copy link
Member

ljharb commented Sep 17, 2018

To set that option, configure the rule with [2, { “enforceDynamicLinks”: “always” }] instead of just 2.

@atomcorp
Copy link
Contributor Author

Thanks for the information!

Personally I find that doc page pretty unclear if you just quickly looking for the rule. I'll try and update it a little later on, similar to this style

@ljharb
Copy link
Member

ljharb commented Sep 20, 2018

Closed in #1988

@ljharb ljharb closed this as completed Sep 20, 2018
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