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

3

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

Scrutable answered 19/6, 2016 at 18:42 Comment(0)
B
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

Barong answered 30/3, 2017 at 22:59 Comment(2)
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?Cockpit
@Cockpit 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)Luculent
C
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

Chigetai answered 20/6, 2016 at 8:23 Comment(0)
B
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

Blowsy answered 23/3, 2019 at 18:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.