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

Improve Typescript and Javascript out of the box experience #144062

Closed
5 tasks
isidorn opened this issue Feb 28, 2022 · 3 comments
Closed
5 tasks

Improve Typescript and Javascript out of the box experience #144062

isidorn opened this issue Feb 28, 2022 · 3 comments
Assignees
Labels
javascript JavaScript support issues plan-item VS Code - planned item for upcoming typescript Typescript support issues
Milestone

Comments

@isidorn
Copy link
Contributor

isidorn commented Feb 28, 2022

I plan to investigate the JS+TS out of the box experience, and will update this issue with action items as I come across them:

fyi @jrieken @mjbvz @DanielRosenwasser @digitarald for ideas

@isidorn isidorn added typescript Typescript support issues javascript JavaScript support issues plan-item VS Code - planned item for upcoming labels Feb 28, 2022
@isidorn isidorn added this to the March 2022 milestone Feb 28, 2022
@isidorn
Copy link
Contributor Author

isidorn commented Mar 23, 2022

I took an existing JS project and we have 0 ux on how to convert that project to typescript. I think we should invest in tools that generate a jsconfig or a tsconfig.json. I found a create a jsconfig.file under the language status, this command opens a new editor with the content pre-filled. Here are some ideas for improvements:

  1. Create a jsconfig.file should also be present in the command palette. There should also be a "create a tsconfig.file"
  2. We should review the attributes that get generated in this config files, to make sure the most popular ones are there so the users can easily discover them. We should add comments for clarification and link to jsconfig docs
  3. The commands should be contributed to the Explorer Context Menu - if jsconfig or tsconfig can not be found in the workspace.
  4. If there is a typescript file open, and there is no tsconfig.json in the repository we should offer the user to automatically to create a tsconfig.json. I think a notification in this case is acceptable.
  5. We should make the problems welcome view contributable. Same how the Explorer and Debug do this already. So if there are no problems the welcome view is shown. This is a great opportunity for the Typescript extension to contribute a button like "For more precise error reporting generate jsconfig.json / tsconfig.json". fyi @lszomoru
  6. Typescript needs to contribute to the welcome view. Same how python is doing. fyi @digitarald

@isidorn
Copy link
Contributor Author

isidorn commented Mar 23, 2022

Feedback from Typescript team:

  • the ideas sound good
  • offering to generate tsconfig.json is ok to be aggressive. For jsconfig.json we should be more subtle. We should think about generating jsconfig.json inside the .vscode folder.
  • we sometimes can not figure out what is the right location to generate tsconfig.json. When it is unclear we should ask user
  • if we want to market some attributes in tsconfig.json / jsconfig.json we should write them in those files even if they have a default value so users can discover them
  • Related discussion for inferring with jsconfig.json not present. Turns out it is complex.

Based on this great discussion I have updated the initial comment with action items.
Moving to next milestone as this is ongoing work.

fyi @chrisdias

@isidorn
Copy link
Contributor Author

isidorn commented Apr 25, 2022

We have synced with the TS team and they will look into microsoft/TypeScript#48597, microsoft/TypeScript#48598 and microsoft/TypeScript#48489

For TS docs Greg and me can look into it this and next week.
For js/ts getting started Connor will most likely look next milestone into this.

Thus moving this wrapper issue to backlog, and each linked issue will be tracked in different milestones / projects. Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues plan-item VS Code - planned item for upcoming typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

2 participants