@putout/plugin-remove-unused-variables
Advanced tools
Comparing version 1.8.0 to 1.9.0
@@ -15,2 +15,9 @@ 'use strict'; | ||
const generator = () => { | ||
let i = 0; | ||
return () => --i; | ||
}; | ||
const generate = generator(); | ||
module.exports = (ast, opts = {}) => { | ||
@@ -139,3 +146,8 @@ const vars = {}; | ||
const getLocLine = ({loc}) => { | ||
const getLocLine = (block) => { | ||
const {loc} = block; | ||
if (!loc) | ||
return generate(); | ||
const { | ||
@@ -142,0 +154,0 @@ start, |
{ | ||
"name": "@putout/plugin-remove-unused-variables", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)", | ||
@@ -18,3 +18,8 @@ "description": "putout plugin adds ability to find and remove unused variables", | ||
"watch:test": "nodemon -w lib -w test -x \"npm test\"", | ||
"lint": "eslint lib test --ignore-pattern test/fixture", | ||
"lint:eslint": "eslint lib test --ignore-pattern test/fixture", | ||
"lint:eslint:fix": "redrun lint:eslint -- --fix", | ||
"lint": "redrun transform lint:eslint", | ||
"lint:fix": "redrun transform:fix lint:eslint:fix", | ||
"transform": "putout lib test", | ||
"transform:fix": "putout lib test --fix", | ||
"coverage": "nyc npm test" | ||
@@ -32,2 +37,3 @@ }, | ||
"devDependencies": { | ||
"@putout/eslint-config": "^1.1.0", | ||
"@putout/test": "^1.3.0", | ||
@@ -37,6 +43,6 @@ "coveralls": "^3.0.0", | ||
"eslint-plugin-node": "^8.0.0", | ||
"eslint-plugin-tape": "^1.1.0", | ||
"just-camel-case": "^4.0.2", | ||
"nodemon": "^1.18.9", | ||
"nyc": "^13.0.1", | ||
"putout": "^3.8.0", | ||
"redrun": "^7.0.2", | ||
@@ -43,0 +49,0 @@ "supertape": "^1.2.0" |
26496
670
11