pzavolinsky / ts-unused-exports

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

Confusing: ignoreFiles regex input has the file extensions stripped off #296

Closed bugeats closed 5 months ago

bugeats commented 1 year ago

I was trying to ignore a vitest.config.ts reporting false positives.

This works:

--ignoreFiles="^.*\.config$"

This does not:

--ignoreFiles="^.*\.config\.ts$"

I had to trawl through the source to figure out that the file paths that are passed to the regex have the extensions stripped off. Maybe there's a good reason for it, but I found it confusing and unexpected.