use set literal instead of big disjunction of literals

This commit is contained in:
Erik Krogh Kristensen
2021-10-26 12:55:25 +02:00
parent db3c99d64d
commit a3c55c2aec
46 changed files with 590 additions and 1259 deletions

View File

@@ -76,13 +76,11 @@ class StateUpdateVolatileMethod extends Function {
// - componentsWillMount
// - componentsDidMount
exists(ReactComponent c |
methodName = "componentDidUnmount" or
methodName = "componentDidUpdate" or
methodName = "componentWillUpdate" or
methodName = "getDefaultProps" or
methodName = "getInitialState" or
methodName = "render" or
methodName = "shouldComponentUpdate"
methodName =
[
"componentDidUnmount", "componentDidUpdate", "componentWillUpdate", "getDefaultProps",
"getInitialState", "render", "shouldComponentUpdate"
]
|
this = c.getInstanceMethod(methodName)
)