pzavolinsky / ts-unused-exports

ts-unused-exports finds unused exported symbols in your Typescript project
MIT License
749 stars 49 forks source link

Add ignoreLocallyUsed Flag #282

Closed DLeyland closed 1 year ago

DLeyland commented 1 year ago

This implements the suggestion from https://github.com/pzavolinsky/ts-unused-exports/issues/30

--ignoreLocallyUsed means that exports which are used in the same file they are defined in won't be reported as unused.

This is implemented by counting a local use of a given variable as an import. Note that this results in needing to traverse significantly more of the AST, so there may be a performance impact for larger codebases.

mrseanryan commented 1 year ago

Thank you @DLeyland for contributing!