Comparing version 1.2.0 to 1.2.1
@@ -21,3 +21,2 @@ | ||
traverseObjectProps({path, vars}); | ||
traverseFnParams({path, returnPath, vars}); | ||
}, | ||
@@ -94,2 +93,5 @@ | ||
if (!node.init) | ||
return; | ||
if (!node.init.properties) | ||
@@ -110,35 +112,2 @@ return; | ||
function traverseFnParams({path, vars, returnPath}) { | ||
const { | ||
node, | ||
scope, | ||
} = path; | ||
const {params} = node.init; | ||
if (!params) | ||
return; | ||
for (const param of params) { | ||
const {name} = param; | ||
const { | ||
line, | ||
column, | ||
} = getPosition(param); | ||
init({ | ||
name, | ||
scope, | ||
vars, | ||
path, | ||
returnPath, | ||
loc: { | ||
line, | ||
column, | ||
}, | ||
}); | ||
} | ||
} | ||
function init({vars, name, scope, path, loc, returnPath}) { | ||
@@ -145,0 +114,0 @@ const scopeNumber = getScopeNumber(name, scope); |
{ | ||
"name": "putout", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
@@ -5,0 +5,0 @@ "description": "find and remove unused variables", |
Sorry, the diff of this file is not supported yet
9522
202