wasp icon indicating copy to clipboard operation
wasp copied to clipboard

Ensure "user" tsconfig.json files exists and is correct

Open sodic opened this issue 2 years ago • 4 comments

To provide proper IDE support (go to definition, type signatures, etc.), Wasp currently generates a "dummy" tsconfig.json file and places it inside the directories with user code (i.e., src/{server,shared,client}). This happens during project creation. Check the docs for more info.

What if the user has since (by accident or malicious intent) deleted the tsconfig.json file. Should Wasp detect this and regenerate it? Old versions aren't a problem, as we've given them a detailed migration guide that solves this problem.

sodic avatar Jan 08 '23 00:01 sodic

Ot what if they modified them?

Martinsos avatar Jan 09 '23 18:01 Martinsos

I would call this "should Wasp manage tsconfig.json files"? And I think the answer is yes. It should check if they are there, if they are not generate them, and if they are there but something is wrong with them, fix them -> it might just go for it, or warn user about something, ... . Maybe some parts of tsconfig are managed by user, and some parts are by Wasp.

Martinsos avatar Apr 27 '23 13:04 Martinsos

Wasp 0.12.0 shifted the goals for this issue (i.e., we no longer have different files for configuring TS on client and server), but the rest is still relevant.

sodic avatar Feb 29 '24 14:02 sodic

Related to #2169

infomiho avatar Jul 11 '24 15:07 infomiho