Search code examples
javascriptwebstormindentationjetbrains-ideauto-indent

WebStorm auto-indent inconsistent with indentation settings


I want to auto-indent an entire JavaScript file in WebStorm, and in my settings I have the following:

indent settings

The problem is that when I use the menu Code -> Auto-Indent Lines or Code -> Reformat Code the indentation level remains at 2.

Is there a setting somewhere I am missing? I don't want to be inconsistent with the coding standards put in place.


Solution

  • The problem was with the .editorconfig file located in the root of the project directory. Although I can't recall receiving a warning, the settings in that file overwrote the Webstorm settings, and changing them to the desired indentations resulted in the desired result.