Add information on manually installing Typescript plugin. (#2727)#2728
Add information on manually installing Typescript plugin. (#2727)#2728Jutanium merged 10 commits intowithastro:mainfrom eurghwhy:main
Conversation
✅ Deploy Preview for astro-docs-2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
|
Thanks for this PR, this needs to be documented! This should go in the TypeScript guide, rather than the Installation guide, as the TypeScript guide covers Feel free to move it, or let me know and I'll push to this branch. |
|
Just checking up on this @feraleyebrows! I know there was discussion about this, and we decided this should go on the TypeScript page itself. I'm sure @Jutanium is still happy to move this there for you, if that's easier! |
|
I’ll try and get round to it |
|
@sarah11918 @Jutanium done |
Jutanium
left a comment
There was a problem hiding this comment.
Thanks, just left some edits!
Co-authored-by: Dan Jutan <danjutan@gmail.com>
| <PackageManagerTabs> | ||
| <Fragment slot="npm"> | ||
| ```shell | ||
| npm install @astrojs/ts-plugin |
There was a problem hiding this comment.
In some editors, installing TypeScript plugins locally won't work if you're not also using the workspace version of TypeScript (if it exists). Next.js for instance ask you to switch to the workspace TypeScript (which is always pre-installed in their case) to use their TypeScript plugin.
I'm not sure about Sublime Text especially, but this is something to keep in mind.
| "name": "@astrojs/ts-plugin" | ||
| }, | ||
| ], | ||
| "jsx": "react", |
There was a problem hiding this comment.
| "jsx": "react", | |
| "jsx": "preserve", |
Switch to preserve as it's the safest option
What kind of changes does this PR include?
Description