Skip to content

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

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

Closed
1 of 4 tasks
sosukesuzuki opened this issue Feb 17, 2020 · 2 comments · Fixed by #1086
Closed
1 of 4 tasks

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

sosukesuzuki opened this issue Feb 17, 2020 · 2 comments · Fixed by #1086

Comments

@sosukesuzuki
Copy link
Contributor

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

@sosukesuzuki
Copy link
Contributor Author

To any maintainer. Can I work on this?

@ota-meshi
Copy link
Member

Thank you for this rule proposal.

I think it is good to add this rule to eslint-plugin-vue.
I'm not familiar with this vulnerability, so I'm not sure about the rule details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants