Socket
Socket
Sign inDemoInstall

eslint-plugin-react

Package Overview
Dependencies
Maintainers
2
Versions
211
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react - npm Package Compare versions

Comparing version 7.26.0 to 7.26.1

9

lib/rules/jsx-no-target-blank.js

@@ -100,3 +100,4 @@ /**

const messages = {
noTargetBlank: 'Using target="_blank" without rel="noreferrer" is a security risk: see https://html.spec.whatwg.org/multipage/links.html#link-type-noopener'
noTargetBlankWithoutNoreferrer: 'Using target="_blank" without rel="noreferrer" (which implies rel="noopener") is a security risk in older browsers: see https://mathiasbynens.github.io/rel-noopener/#recommendations',
noTargetBlankWithoutNoopener: 'Using target="_blank" without rel="noreferrer" or rel="noopener" (the former implies the latter and is preferred due to wider support) is a security risk: see https://mathiasbynens.github.io/rel-noopener/#recommendations'
};

@@ -177,3 +178,4 @@

if (hasDangerousLink && !hasSecureRel(node, allowReferrer, warnOnSpreadAttributes, spreadAttributeIndex)) {
report(context, messages.noTargetBlank, 'noTargetBlank', {
const messageId = allowReferrer ? 'noTargetBlankWithoutNoopener' : 'noTargetBlankWithoutNoreferrer';
report(context, messages[messageId], messageId, {
node,

@@ -249,3 +251,4 @@ fix(fixer) {

) {
report(context, messages.noTargetBlank, 'noTargetBlank', {
const messageId = allowReferrer ? 'noTargetBlankWithoutNoopener' : 'noTargetBlankWithoutNoreferrer';
report(context, messages[messageId], messageId, {
node

@@ -252,0 +255,0 @@ });

@@ -43,3 +43,3 @@ /**

const name = node.arguments[0].value;
if (name.indexOf(':') === -1) return undefined;
if (typeof name !== 'string' || name.indexOf(':') === -1) return undefined;
report(context, messages.noNamespace, 'noNamespace', {

@@ -55,3 +55,3 @@ node,

const name = elementType(node);
if (name.indexOf(':') === -1) return undefined;
if (typeof name !== 'string' || name.indexOf(':') === -1) return undefined;
report(context, messages.noNamespace, 'noNamespace', {

@@ -58,0 +58,0 @@ node,

{
"name": "eslint-plugin-react",
"version": "7.26.0",
"version": "7.26.1",
"author": "Yannick Croissant <yannick.croissant+npm@gmail.com>",

@@ -5,0 +5,0 @@ "description": "React specific linting rules for ESLint",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc