diff --git a/lib/rules/prefer-const.js b/lib/rules/prefer-const.js index 595bb8a53b2..1395e0a8a08 100644 --- a/lib/rules/prefer-const.js +++ b/lib/rules/prefer-const.js @@ -85,17 +85,6 @@ function getIdentifierIfShouldBeConst(variable, ignoreReadBeforeAssign) { return null; } - /* - * Due to a bug in acorn, code such as `let foo = 1; let foo = 2;` will not throw a syntax error. As a sanity - * check, make sure that the variable only has one declaration. After the parsing bug is fixed, this check - * will no longer be necessary, because variables declared with `let` or `const` should always have exactly one - * declaration. - * https://github.com/ternjs/acorn/issues/487 - */ - if (variable.defs.length > 1) { - return null; - } - // Finds the unique WriteReference. let writer = null; let isReadBeforeInit = false;