-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Review the project setup experience #41580
Comments
Possible spaces for exploration:
|
Just throwing out what I myself would want to happen,
|
My first thought, too. You could ask the user... |
Making a minimal interactive command similar to that of eslint can be an interesting option too. |
I figure you have telemetry for this; but one more datapoint for you: I use tsc --init all the time and just "uncomment out" all the strict options. Max safety, I want all the red squigglies and inference you can muster. |
I like the fact that
when the actual default value is |
Another problem is that when upgrading, there isn't a "tsc --upgrade" command to add new flags into the |
The default value of some of the flags is also confusing for people who are new to the flags and trying to set it up for themselves manually or through |
Probably not related with the "initial setup" but I've long wished an easier way for the user to enable strict flags. Something like enable globally strict null checks but only report (or hide) reports for specific paths I could create a new Typescript configuration extension file for each folder with code that is stable/mature enough, but that just forces me to over complicate my setup. Also I have yet to find a way to make VsCode cooperate with multiple Typescript configurations Enabling the user to enjoy the benefits of strict typing (in part of their code) without investing too much time in advanced configuration topics might be consider a better setup experience. |
what about > tsc init --modern # create a new file
> tsc init --upgrade # run to upgrade existing tsconfig.json to enable all suggested options |
Good issue! I had a poor experience the last time I had to While you're working at it, here are some ideas/suggestions:
|
It would be great to opt into using the latest recommended options as defaults, instead of updating manually (even with Something like This is perfectly OK for reproducible builds if the recommended settings only change with compiler versions. This would also make the generated tsconfig smaller for those who are OK with fixing errors right away or disabling the new options explicitly. |
FYI, I use Next.js's tsconfig (with minor changes) in both Node.js or browser based projects and it works great. I think it is a good boilerplate to start with. |
Today,
tsc --init
creates a big-ol' file that is super intimidating. We try to provide comments and blocks of sections to give people a clear separation of config concerns. We also provide a link to https://aka.ms/tsconfig.json.We also have a belief that most people don't even use
tsc --init
.That said, there are problems, and
tsc --init
doesn't make it totally clear what the "best practices" are for starting a project. Things that are missing:src
,tsconfig
naming)tsc --init
In short:
The text was updated successfully, but these errors were encountered: