pzavolinsky / ts-unused-exports

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

Handle absolute paths for import statements #37

Closed tabansal closed 5 years ago

tabansal commented 5 years ago

I'm using absolute paths to load Components and other files in my project.

Something like

import App, { mapDispatchToProps, mapStateToProps } from "Components/App";

So when I run ts-unused-export it gives all exported members as un-used. Although I'm importing them.

Can you please check on priority basis?

mrseanryan commented 5 years ago

Could this be solved via #26 ?

mrseanryan commented 5 years ago

I think this is fixed in master, via this PR:

https://github.com/pzavolinsky/ts-unused-exports/pull/44

Is released (v 2.1.0)

mrseanryan commented 5 years ago

Closing, as believe this is fixed.

mindaugasnakrosis commented 4 years ago

@tabansal Does absolute paths seem to work for you? If so could you share your minimal tsconfig?

mrseanryan commented 4 years ago

@mindaugasnakrosis there is an example here:

https://github.com/pzavolinsky/ts-unused-exports/blob/master/example/with-paths/math.ts

If it is not working - can you please share a simple example of the TypeScript file and also the tsconfig.json ?

mrseanryan commented 4 years ago

The full example is here, with tsconfig.json:

https://github.com/pzavolinsky/ts-unused-exports/tree/master/example/with-paths