Skip to content

Add information on manually installing Typescript plugin. (#2727)#2728

Merged
Jutanium merged 10 commits intowithastro:mainfrom
eurghwhy:main
Mar 16, 2023
Merged

Add information on manually installing Typescript plugin. (#2727)#2728
Jutanium merged 10 commits intowithastro:mainfrom
eurghwhy:main

Conversation

@eurghwhy
Copy link
Copy Markdown
Contributor

What kind of changes does this PR include?

  • New or updated content

Description

Screenshot 2023-02-24 at 12 07 49

@netlify
Copy link
Copy Markdown

netlify bot commented Feb 24, 2023

Deploy Preview for astro-docs-2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 5cc3699
🔍 Latest deploy log https://app.netlify.com/sites/astro-docs-2/deploys/6413917ad138b0000808c79c
😎 Deploy Preview https://deploy-preview-2728--astro-docs-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sarah11918 sarah11918 added the improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes) label Feb 24, 2023
@Jutanium
Copy link
Copy Markdown
Contributor

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 tsconfig.json and is where someone would go if they're experiencing weird TS behavior in their editor. We can then link to it from this installation guide.

Feel free to move it, or let me know and I'll push to this branch.

@sarah11918
Copy link
Copy Markdown
Member

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!

@eurghwhy
Copy link
Copy Markdown
Contributor Author

eurghwhy commented Mar 2, 2023

I’ll try and get round to it

@eurghwhy
Copy link
Copy Markdown
Contributor Author

eurghwhy commented Mar 2, 2023

@sarah11918 @Jutanium done

Copy link
Copy Markdown
Contributor

@Jutanium Jutanium left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, just left some edits!

<PackageManagerTabs>
<Fragment slot="npm">
```shell
npm install @astrojs/ts-plugin
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"jsx": "react",
"jsx": "preserve",

Switch to preserve as it's the safest option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improve or update documentation Enhance / update existing documentation (e.g. add example, improve description, update for changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add information for manually installing Typescript plugin

4 participants