Skip to content

Commit

Permalink
allow module.exports
Browse files Browse the repository at this point in the history
  • Loading branch information
despairblue committed Mar 15, 2016
1 parent 55043ab commit 87fc4c5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions index.js
Expand Up @@ -22,11 +22,15 @@ module.exports = {
return {
"AssignmentExpression": function(node) {
if (node.left.type === "MemberExpression") {
context.report(node, "No object mutation allowed.");
var memberExpression = node.left

if (memberExpression.object.name !== 'module' && memberExpression.property.name !== 'exports') {
context.report(node, "No object mutation allowed.");
}
}
}
}
}
}
},
configs: {
recommended: {
Expand All @@ -36,7 +40,7 @@ module.exports = {
'redux/no-mutation': 2
}
}
}
}
};


Expand Down

0 comments on commit 87fc4c5

Please sign in to comment.