pzavolinsky / ts-unused-exports

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

Add .js extension support with es6 example #255

Closed mrseanryan closed 1 year ago

mrseanryan commented 1 year ago

Fixes #214

mon-jai commented 1 year ago

I don't know if TypeScript allow .js extension if target or module is not es*.

In case TypeScript not allowing it, it may be better to add a check and mirror TypeScript's semantic.

mrseanryan commented 1 year ago

I don't know if TypeScript allow .js extension if target or module is not es*.

In case TypeScript not allowing it, it may be better to add a check and mirror TypeScript's semantic.

hm - Im thinking it is simplest to always allow for js imports - since tsu does not need to build the project, just scan it.

Internally we were already partly doing this by allowing for index.js

if there is some build error, the dev will fix, then run tsu again…

mrseanryan commented 1 year ago

Looks good for major release - let me know if you have more feedback or ideas !