Possible Errors

Best Practices

Strict Mode

Variables

Node.js and CommonJS

Stylistic Issues

ECMAScript 6

block-scoped-var

- Enforce the use of variables within the scope they are defined

This rule aims to reduce the usage of variables outside of their binding context and emulate traditional block scope from other languages. This is to help newcomers to the language avoid difficult bugs with variable hoisting.

What ESLint should do when it catches the rule break

Show a warning

Rule examples

You can check them out here.