We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b8105e1 commit 2117624Copy full SHA for 2117624
lib/util/makeNoMethodSetStateRule.js
@@ -47,7 +47,7 @@ function makeNoMethodSetStateRule(methodName) {
47
depth++;
48
}
49
if (
50
- (ancestors[i].type !== 'Property' && ancestors[i].type !== 'MethodDefinition') ||
+ (ancestors[i].type !== 'Property' && ancestors[i].type !== 'MethodDefinition' && ancestors[i].type !== 'ClassProperty') ||
51
ancestors[i].key.name !== methodName ||
52
(mode !== 'disallow-in-func' && depth > 1)
53
) {
0 commit comments