Home > Net >  How do I configure Visual Studio Code for Typescript?
How do I configure Visual Studio Code for Typescript?

Time:01-17

I'm writing typescript with not much experience and when I deploy my functions to the server, I get a ton of errors like "character limit for each line must be 80 characters", "blocks cannot be padded", "unexpected var, use let or const instead", indentation errors, etc. But there are so many that I feel like maybe I missed a step in configuring Visual Studio Code specifically for Typescript. For example, is there a way I can draw a vertical line in the editor to serve as a visual aid for the 80 character limit?

CodePudding user response:

Install the typescript compiler using the command npm install -g typescript.

For more information you can read on their official documentation https://code.visualstudio.com/docs/languages/typescript

CodePudding user response:

Try using prettier and configure vscode to format on save. This will take care of line length and indentation errors at least.

  • Related