pzavolinsky / ts-unused-exports

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

Add option to include line and column in the result output #57

Closed mrseanryan closed 5 years ago

mrseanryan commented 5 years ago

Add option to include line and column in the result output.

Currently, in an IDE like Visual Code, CTRL + Clicking on an issue opens the relevant file.

However, if the line number and column were included, then the IDE would navigate to the correct part of the file.

Example:

BEFORE: /home/sean/src/github/my-proj/src/components/utils/Timer.ts: Timer AFTER: /home/sean/src/github/my-proj/src/components/utils/Timer.ts[15,5]: Timer

This could be a new cmd line option, just in case it causes issues for users who do not need it.

mrseanryan commented 5 years ago

The option could be like --showLineNumber

mrseanryan commented 5 years ago

note: for some files this is difficult, since the unused export comes from an imported file (especially true of index.ts files).

So this feature would need careful testing.

mrseanryan commented 5 years ago

Closing - implemented in master