Ishan Patel
Ishan Patel

Reputation: 6091

How to auto add "missing whitespace" in VSCode?

I have some tslint errors for "missing whitespace" in React project.

Is there a way I can auto fix (auto add) them without disabling rule?

Upvotes: 0

Views: 3033

Answers (2)

Corné
Corné

Reputation: 1413

In VS Code under settings, search for format, and click typescript, you will see a few whitespace options. Choose your prefered setting(s). Please see screenshot below.

enter image description here

Upvotes: 0

basarat
basarat

Reputation: 275927

Is there a way I can auto fix (auto add) them without disabling rule?

Add prettier to your project and it will format the code for you.

More

https://www.npmjs.com/package/tslint-config-prettier

Upvotes: 1

Related Questions