MikeFHay
MikeFHay

Reputation: 9023

IntelliJ IDEA JSX code style

I have a JSX file with two-space indents, but IntelliJ keeps adding four-space indents. Changing Settings>Editor>Code Style for Javascript, HTML, and "other file types" does not seem to affect this.

How can I change the code style for JSX files?

Upvotes: 7

Views: 3182

Answers (1)

MikeFHay
MikeFHay

Reputation: 9023

Turns out the reason the IDE wasn't responding to my settings changes is it was using EditorConfig mode (Settings>Editor>Code Style>EditorConfig). Editing the .editorconfig file to have the line indent_size = 2 fixed the issue.

Upvotes: 4

Related Questions