@putout/plugin-convert-const-to-let
Advanced tools
Comparing version
@@ -9,3 +9,2 @@ 'use strict'; | ||
path.node.kind = 'let'; | ||
path.__putout_convert_const_to_let = true; | ||
}; | ||
@@ -15,4 +14,2 @@ | ||
VariableDeclaration: (path) => { | ||
if (path.__putout_convert_const_to_let) | ||
return; | ||
for (const binding of values(path.scope.bindings)) { | ||
@@ -22,4 +19,7 @@ if (binding.constant) | ||
if (binding.path.isVariableDeclarator() && binding.kind === 'const') | ||
const {parentPath} = binding.path; | ||
if (binding.path.isVariableDeclarator() && parentPath.node.kind === 'const') { | ||
push(binding.path.parentPath); | ||
} | ||
} | ||
@@ -26,0 +26,0 @@ }, |
{ | ||
"name": "@putout/plugin-convert-const-to-let", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"type": "commonjs", | ||
@@ -5,0 +5,0 @@ "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", |
4100
-0.75%18
-5.26%