ts-unused-exports
Advanced tools
Comparing version 3.0.0 to 3.0.1
## [Unreleased] - ReleaseDate | ||
### Added | ||
### Changed | ||
- Fix bug introduced by --showLineNumber option, where analysis throws error on more complex projects. | ||
## [3.0.0] - 27 Oct 2019 | ||
### Changed | ||
- Updated TypeScript dependency to 3.6.4 | ||
## [2.2.0] - 27 Oct 2019 | ||
### Added | ||
- If the option --showLineNumber is given, then output 1 line per unused export, with the location in the file (line number, column) | ||
@@ -7,3 +17,2 @@ | ||
- Fix the --ignorePaths option (it was incorrectly filtering the parsed files, instead of filtering the output) | ||
- Updated TypeScript dependency to 3.6.4 | ||
@@ -10,0 +19,0 @@ ## [2.1.0] - 20 Oct 2019 |
@@ -25,6 +25,18 @@ "use strict"; | ||
return; | ||
var addUsage = function (imp) { | ||
if (!ex[imp]) { | ||
ex[imp] = { | ||
usageCount: 0, | ||
location: { | ||
line: 1, | ||
character: 1 | ||
} | ||
}; | ||
} | ||
ex[imp].usageCount++; | ||
}; | ||
imports[key].forEach(function (imp) { | ||
return imp == '*' | ||
? Object.keys(ex).filter(function (e) { return e != 'default'; }).forEach(function (e) { return ex[e].usageCount++; }) | ||
: ex[imp].usageCount++; | ||
? Object.keys(ex).filter(function (e) { return e != 'default'; }).forEach(addUsage) | ||
: addUsage(imp); | ||
}); | ||
@@ -31,0 +43,0 @@ }); |
{ | ||
"name": "ts-unused-exports", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "ts-unused-exports finds unused exported symbols in your Typescript project", | ||
@@ -5,0 +5,0 @@ "main": "lib/app.js", |
30109
620