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.
When eval appears, escope mark the scope dynamic. This is because eval can introduce new variable: eval("var i = 20"). So escope takes very conservative analysis on this pattern.
If you would like to ignore eval detection, you can specify options.ignoreEval
Ahh.. thanks for the explanation. One question though. Wouldn't it make sense to leave variables that were declared outside of eval as static? They are already declared, eval might change their value and add new variables, but it will not be able to change the fact that they are declared.
The following code:
Will put one variable into
througharray -alert. However, if you changealerttoevallike so:There are now 3 variables in
through.eval,ultimateAnswerandstuffToEval.This was found and reported here: eslint/eslint#376
The text was updated successfully, but these errors were encountered: