allegro / typescript-strict-plugin

Typescript plugin that allows turning on strict mode in specific files or directories.
MIT License
332 stars 29 forks source link

tsc-strict seems to succeed resultless on out-of-memory failure #42

Closed max-kahnt-keylight closed 1 year ago

max-kahnt-keylight commented 1 year ago

We need to run our typescript transpilation process with NODE_OPTIONS='--max-old-space-size=8192'. Subsequently running the typecheck has the following issue:

max@host master ~/code$ npx tsc-strict
Project does not contain any strict files.

is reported incorrectly whereas

max@host master ~/code$ NODE_OPTIONS='--max-old-space-size=8192' npx tsc-strict
🎯 Found 1062 strict files
🎉 All files passed

yields the correct result. I think typecheck should not succeed in the first place for out-of-memory errors and populate this error instead. Probably is related to tsc being called with the noEmit option. The terminal error response ($? evaluates to 1) is actually correct, but no obvious output is available.

Found by a colleague actually, not my credit.