wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
12.73k stars 1.13k forks source link

Enable a subset of `strict: true` when building SDK #2054

Closed sodic closed 1 month ago

sodic commented 1 month ago

Fixes #2010

[!CAUTION] Possible problem (and breaking change):

If users change their tsconfig.json from strict: true to strict: false and break the rules enforced in this PR, our SDK build will fail.

This isn't a big deal since the recommendation is to start all new TS projects with strict: true.

Also, problems caused by mismatches between the user's tsconfig.json and the one used to compile the SDK aren't new - it's just that strict options specifically didn't have this problem because the SDK was using strict: false (the most permissive possible setting).

The good news is that I've stumbled upon a way to fix most of our SDK-related TS config problems (and possibly even framework-code-related problems). I already have a POC and will document it with an issue ASAP. This is all already covered by #1827.

Extra stuff to do before merging:

Martinsos commented 1 month ago

LGTM from far above, I will let @infomiho do the proper review!