blitz-js / legacy-framework

MIT License
3 stars 2 forks source link

Use strict TypeScript option for new apps #39

Open alexturpin opened 3 years ago

alexturpin commented 3 years ago

What do you want and why?

We should turn on the tsconfig strict mode by default. strict mode allows the static type checker to catch even more potential problems!

Possible implementation(s)

Set strict to true in https://github.com/blitz-js/blitz/blob/canary/packages/generator/templates/app/tsconfig.json

Additional context

Searching for this, it seems that there was a PR to address some strict mode issues https://github.com/blitz-js/blitz/pull/970 but I don't see one where we turn it on by default.

flybayer commented 3 years ago

Hey Alex, thank you for the suggestion. While this is something we can consider a bit down the road (I always use strict mode personally), for now we'll leave it out because we don't have full JS support yet and strict mode is extra difficult for people new to TS (currently lots are using TS for the first time with Blitz.)

alexturpin commented 3 years ago

Thanks Brandon, appreciate the answer, totally get it.