Skip to content

Rule Proposal: template-no-target-blank #1054

Closed
@sosukesuzuki

Description

@sosukesuzuki

Please describe what the rule should do:

This rule should warn when rel='noreferrer noopener' does not exist in attributes of an anchor tag with target="_blank".

What category should the rule belong to?

  • Enforces code style
  • Warns about a potential error
  • Suggests an alternate way of doing something
  • Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

<template>
  <a href="http://example.com" target="_blank">link</a>
</template>

Additional context

ref: https://developers.google.com/web/tools/lighthouse/audits/noopener?hl=en
A rule does exist for this problem in eslint-plugin-react

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions