Possible Errors

Best Practices

Strict Mode

Variables

Node.js and CommonJS

Stylistic Issues

ECMAScript 6

no-loop-func

- Disallow function declarations and expressions inside loop statements

This error is raised to highlight a piece of code that may not work as you expect it to and could also indicate a misunderstanding of how the language works. Your code may run without any problems if you do not fix this error, but in some situations it could behave unexpectedly.

What ESLint should do when it catches the rule break

Show a warning

Rule examples

You can check them out here.