Skip to content

Commit

Permalink
[Refactor] no-*-set-state: improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
golopot committed Apr 16, 2022
1 parent 96b3b06 commit 3bc35b3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/util/makeNoMethodSetStateRule.js
Expand Up @@ -73,16 +73,16 @@ module.exports = function makeNoMethodSetStateRule(methodName, shouldCheckUnsafe
return false;
}

if (shouldBeNoop(context, methodName)) {
return {};
}

// --------------------------------------------------------------------------
// Public
// --------------------------------------------------------------------------

return {
CallExpression(node) {
if (shouldBeNoop(context, methodName)) {
return;
}

const callee = node.callee;
if (
callee.type !== 'MemberExpression'
Expand Down

0 comments on commit 3bc35b3

Please sign in to comment.