Jerald
Jerald

Reputation: 4048

How to import code formatting settings from tslint.json in webstorm?

Is it possible to import formatting settings (Settings => Editor => Code Style => Typescript) from my tslint.json file in webstorm? I use rules directory "node_modules/codelyzer" in my tslint.json file

Upvotes: 7

Views: 5954

Answers (3)

As of 2018, you can manually apply TsLint settings:

  • Find your tslint.json file in the Editor or File tree (can also be a tslint.yaml)
  • Right click the file (again, this can be the Editor pane or the file in the tree)
  • Select Apply TSLint Code Style Rules. (should be the last option)

The Event Log should be updated with:

TSLint: The project code style and editor settings were updated based on 'tslint.json'.

More from JetBrains (with pictures): WebStorm Help | Importing code style from a TSLint configuration file

Upvotes: 0

Gabrielizalo
Gabrielizalo

Reputation: 946

Since 2017 WebStorm version, it's possible to Apply code style.

Just open tslint.json and WebStorm will ask if it can import it.

Read it about it in WebStorm 2017.1 EAP, 171.2455: improved integration with TSLint

Upvotes: 16

Ekaterina Prigara
Ekaterina Prigara

Reputation: 4957

It's not possible at the moment. You can vote for and follow the updates on this feature request: https://youtrack.jetbrains.com/issue/WEB-19481

Upvotes: 2

Related Questions