gustavopch / tsc-files

A tiny tool to run `tsc` on specific files without ignoring tsconfig.json
MIT License
234 stars 49 forks source link

Incorrect files path (does not catch all files) #61

Open FFdhorkin opened 1 year ago

FFdhorkin commented 1 year ago

cli.js has this line: const files = args.filter(file => /\.(ts|tsx)$/.test(file))

This is incorrect - it doesn't support cts or mts files. It also doesn't work with js/cjs/mjs files with checkJs turned on.

Should be something like const files = args.filter(file => /\.(c|m)?(j|t)sx?$/.test(file))

jonasgeiler commented 1 year ago

My fork implemented this: https://github.com/skayo/tsc-files Not sure if I should do a PR here since I changed some other things, but for now I'll release it as my own package (@jonasgeiler/tsc-files).