Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sodic opened this issue Jan 8, 2023 · 4 comments
Open

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

sodic opened this issue Jan 8, 2023 · 4 comments
Labels
analyzer wasp compiler frontend discussion hm Requires more thought

Comments

@sodic
Copy link
Contributor

sodic commented Jan 8, 2023

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 sodic added hm Requires more thought discussion analyzer wasp compiler frontend labels Jan 8, 2023
@Martinsos
Copy link
Member

Ot what if they modified them?

@Martinsos
Copy link
Member

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 Martinsos changed the title Should we generate "user" tsconfig.json files if they go missing Ensure "user" tsconfig.json files exist and are correct Apr 27, 2023
@sodic
Copy link
Contributor Author

sodic commented Feb 29, 2024

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.

@infomiho
Copy link
Contributor

Related to #2169

@sodic sodic changed the title Ensure "user" tsconfig.json files exist and are correct Ensure "user" tsconfig.json files exists and is correct Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer wasp compiler frontend discussion hm Requires more thought
Projects
None yet
Development

No branches or pull requests

3 participants