pzavolinsky / ts-unused-exports

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

Awareness of typescript project references #112

Open kiprasmel opened 4 years ago

kiprasmel commented 4 years ago

https://www.typescriptlang.org/docs/handbook/project-references.html https://github.com/RyanCavanaugh/project-references-demo

Why?

I have a project called common which exports modules for other projects. Currently ts-unused-exports fails - it reports tons of unused exports, even though they're used in other modules.

Obviously, there're more projects that would want to export modules for other projects, it's not limited to the common one.

My sample project which would benefit from this: https://github.com/sarpik/turbo-schedule

Thanks!

kiprasmel commented 4 years ago

Currently, while there's no work-around available, I'd like to be able to add index.ts file (pointed to from package.json/main to the --ignoreFiles option, but can't seem to do so. Any tips?

mrseanryan commented 4 years ago

Hi @sarpik - thank you for raising this

For now, for index.ts you could try:

--ignoreFiles=index\.ts

Or

--ignoreFiles=index

Or to just omit index.ts rom the output:

--excludePathsFromReport=index

Hope that helps

mrseanryan commented 3 years ago

Possibly this could be handled along with #105