eslint-plugin-react-redux
Advanced tools
Comparing version
@@ -8,3 +8,3 @@ 'use strict'; | ||
const belongsToReduxReact = (node, objectName, destrArg) => { | ||
const belongsToReduxReact = (node, objectName, destrArg, context) => { | ||
const checkProp = (secondArgument) => { | ||
@@ -61,3 +61,3 @@ const secondArgumentName = secondArgument && secondArgument.type === 'Identifier' && secondArgument.name; | ||
const usedInReactRedux = context.getSourceCode().getAncestors(node) | ||
.some(ancestor => belongsToReduxReact(ancestor, nodeName)); | ||
.some(ancestor => belongsToReduxReact(ancestor, nodeName, null, context)); | ||
if (usedInReactRedux) { | ||
@@ -69,3 +69,3 @@ context.report(node, `exclude:${node.property.name}`); | ||
const usedInReactRedux = context.getSourceCode().getAncestors(node) | ||
.some(ancestor => belongsToReduxReact(ancestor, null, node)); | ||
.some(ancestor => belongsToReduxReact(ancestor, null, node, context)); | ||
if (usedInReactRedux) { | ||
@@ -72,0 +72,0 @@ node.properties.forEach((prop) => { |
{ | ||
"name": "eslint-plugin-react-redux", | ||
"version": "4.2.1", | ||
"version": "4.2.2", | ||
"description": "Enforcing best practices for react-redux", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
96615
0.03%