Generated tsconfig.json should set `strict` by default
Ubehebe opened this issue · comments
At head, running miskweb new ...
generates a tsconfig.json
that does not include the strict tsc options. This significantly reduces the value of the TypeScript type system, since any variable/parameter/etc. can have a null
or undefined
value, regardless of its declared type.
I just went through a migration on an internal project where I set strictNullChecks
manually, via the rawTsconfig
field in miskTab.json
. I had to fix a couple hundred type annotations. Enabling these options by default for new projects will get this right from the start.
(Arguably, the real issue is why tsc isn't strict by default, but that ship has sailed.)
This should be in https://github.com/cashapp/misk-web
Oops, thought it was part of this repo.