Skip to content

eslint/no-redeclare Pedantic

What it does

Disallow variable redeclaration

Why is this bad?

n JavaScript, it’s possible to redeclare the same variable name using var. This can lead to confusion as to where the variable is actually declared and initialized.

Example

javascript
var a = 3;
var a = 10;

References

Released under the MIT License.