Skip to content

[Bug]: react/jsx-no-target-blank doesn't seem to work? #3620

@SkylerRogers

Description

@SkylerRogers

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

It seems as if no matter how I add the react/jsx-no-target-blank rule to my eslintrc, it doesn't seem to enforce the rule.

I think the docs also show this is a default rule so it should be enforced by default unless disabled?

If you add <a href="/" target="_blank">test</a> to your jsx, the linter is not enforcing rel="noopener" and/or rel="noreferrer"

Expected Behavior

If you add <a href="/" target="_blank">test</a> to your jsx, the linter should enforce rel="noopener" and/or rel="noreferrer"

eslint-plugin-react version

^7.31.11

eslint version

^8.23.1

node version

16.19.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions