Possible Errors

Best Practices

Strict Mode

Variables

Node.js and CommonJS

Stylistic Issues

ECMAScript 6

no-inner-declarations

- Disallow variable or function declarations in nested blocks

Recommended

This rule requires that function declarations and, optionally, variable declarations be in the root of a program or the body of a function.

What ESLint should do when it catches the rule break

Show a warning

Options

functions

Rule examples

You can check them out here.