This little code should produce error (in my opinion) but it doesn't.
const foo = foo;
This should not be a legal ES6 code. Also it's most often wrong.
Eslint can catch that, fortunately, with no-use-before-define.
Nice catch!
c9dbefcad9c3d124071b096ea12262325c6c31fa
Nice!
I hope this doesn't break things like
const fun = () => {
if (something) {
return fun();
}
return something;
}
But I can only try :D
Yep, I added new regression tests to make sure that continues to work