7

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

3 Answers 3

16

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

Sign up to request clarification or add additional context in comments.

2 Comments

do you know by a chance how do I force WebStorm to ask me again if I want to import settings from tslint.json once I've already answered 'No' before?
@markoffden find action (ctrl + shift + a by default) => apply tslint code style rules according to this (youtrack.jetbrains.com/issue/WEB-28870). It will be shipped on 2018.2 (unpublished when I write this)
2

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

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.