Skip to content

jsx-no-target-blank crashes on empty rel attribute #1269

Closed
@not-an-aardvark

Description

@not-an-aardvark

Using [email protected] and [email protected], the jsx-no-target-blank rule crashes on the following code:

<a href="https://example.com" target="_blank" rel />

This can be reproduced with:

echo '<a href="https://example.com" target="_blank" rel />' | node_modules/.bin/eslint --stdin --no-eslintrc --plugin=react --parser-options='ecmaFeatures: {jsx: true}' --rule 'react/jsx-no-target-blank:error'

This is a very minor issue, since I don't know of a good use case for having an empty rel attribute. I only noticed it because a crash notification appeared in my editor.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions