Closed pauljt closed 2 years ago
Since bar.foo
is the same as bar['foo']
, so we should just catch that in this easy case.
In the bar[foo]
case it's not that easy to resolve foo
, but we could at least highlight that something dynamic is going on :|
Yeh - actually i vaguely remember this just working in esprima. But it should be easy enough to modify the rule template just to check what type the callee is (identified or memberexpression) and do a check based on that.
The member rule .foo, matches both of the following statements, when they mean different things. We need a more complex rule to properly support
bar.foo bar[foo]
and the following is not identified at all:
bar['foo']