IntelliJ IDEA JSX Code Style

I have a JSX file with two indentation, but IntelliJ continues to add indentation with four spaces. The change Settings>Editor>Code Stylefor Javascript, HTML, and other file types does not seem to affect this.

How to change code style for JSX files?

+4
source share
1 answer

It turns out that the reason the IDE does not respond to my settings changes is to use the EditorConfig ( Settings>Editor>Code Style>EditorConfig) mode . Editing the file .editorconfigfor the line indent_size = 2fixes the problem.

+1
source

Source: https://habr.com/ru/post/1649035/


All Articles