Skip to content

Commit

Permalink
Catch setState in cDU and cDM when defined as ClassProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
jaaberg committed Dec 16, 2017
1 parent b8105e1 commit 2117624
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/util/makeNoMethodSetStateRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function makeNoMethodSetStateRule(methodName) {
depth++;
}
if (
(ancestors[i].type !== 'Property' && ancestors[i].type !== 'MethodDefinition') ||
(ancestors[i].type !== 'Property' && ancestors[i].type !== 'MethodDefinition' && ancestors[i].type !== 'ClassProperty') ||
ancestors[i].key.name !== methodName ||
(mode !== 'disallow-in-func' && depth > 1)
) {
Expand Down

0 comments on commit 2117624

Please sign in to comment.