You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
example.js:2:3: Move function `returnsZero` to the outer scope. [Error/unicorn/consistent-function-scoping]
In eslint-plugin-unicorn@20.0.0 and later (up to 7781c3f, current master) it does not cause an error.
I bisected the regression to 1f4413d from #707. Perhaps the IIFE identification is a bit too aggressive? (I wouldn't consider any of the functions in the above example to be immediately-invoked, but perhaps I'm missing something?)
Thanks again,
Kevin
The text was updated successfully, but these errors were encountered:
No worries. I should have caught it earlier. I just tested #772 and it fixes this issue for me and I didn't find any other regressions. Thanks @fisker!
The
consistent-function-scoping
rule no longer warns about functions defined inside a function being passed as an argument. For example:In
eslint-plugin-unicorn@19.0.1
this would cause:In
eslint-plugin-unicorn@20.0.0
and later (up to 7781c3f, currentmaster
) it does not cause an error.I bisected the regression to 1f4413d from #707. Perhaps the IIFE identification is a bit too aggressive? (I wouldn't consider any of the functions in the above example to be immediately-invoked, but perhaps I'm missing something?)
Thanks again,
Kevin
The text was updated successfully, but these errors were encountered: