k0pernikus
k0pernikus

Reputation: 66748

How to align autoformat with TSLint rules in PhpStorm?

I have a TypeScript project with TSLint in place. I can fix a file if I go to the offending place, hit Alt + Enter and select "Fix current file".

Yet if I autoformat the code afterwards, the broken -- as per TSLint rules -- style is restored.

How do I have the TSLint rules be taken into consideration by the autoformat tool of PhpStorm? At best automatically, or do I have to go through the process of having to setup a TypeScript style based on my TSLint rules?

Upvotes: 2

Views: 891

Answers (1)

lena
lena

Reputation: 93868

You can import code style preferences from TSLint - see https://blog.jetbrains.com/webstorm/2017/01/webstorm-2017-1-eap-171-2455/. But note that this only works for those rules that can be mapped to the IDE code style preferences

Upvotes: 1

Related Questions