Closed fergald closed 5 years ago
This should mostly be implemented. What remains is to add tests that contain cases like this (where something shadows the global) and ensure that it doesn't get rewritten. Such tests cases need to cover all possible combinations of { namespace function, static method, method, getter, setter, constructor } x { JS, web } x { directly on object, on prototype }.
I'll rename the issue to focus on tests.
Maybe I'm missing something but isConsoleCallExpression
just looks at the name and so clean-console.js
looks to me like it would fail such a test right now.
Yeah, I think the console transform probably wouldn't pass such a test, that's true. The others would.
I think this is resolved, including the console issue, via #60 and #67 so I'm going to close this for now
We should either be able to distingiush them or be able to enforce in e.g. eslint that we cannot shadow globals with locals of the same name.