Skip to content

Bug in jsx-no-target-blank eslint rule #2774

@green-arrow

Description

@green-arrow

Is this a bug report?

Yes

Can you also reproduce the problem with npm 4.x?

Yes

Which terms did you search for in User Guide?

N/A

Environment

  1. node -v: 7.8.0
  2. npm -v: 4.2.0
  3. yarn --version (if you use Yarn): 0.27.5
  4. npm ls react-scripts (if you haven’t ejected): 1.0.10

Then, specify:

  1. Operating system: macOS Sierra
  2. Browser and version (if relevant): Not relevant

Steps to Reproduce

  1. Insert an a tag with target="_blank" rel="noopener noreferrer" and some styles from glamor
  2. Run via yarn start

Expected Behavior

No errors.

Actual Behavior

Unexpected error in console: TypeError: Cannot read property 'name' of undefined in the jsx-no-target-blank eslint rule.

Additional Comments

I filed a bug in the eslint repo: jsx-eslint/eslint-plugin-react#1296

I am unable to reproduce this with a fresh app. This started occurring after upgrading from 1.0.4 to 1.0.10. I've tried removing node_modules and yarn.lock and installing from scratch, but still get the same error.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions