Reformat code did not respect code styles from settings.

Hi !
In my "code styles" JS has indent as 2 spaces.
But the "reformat code" command makes 4 spaces in code. 

Why did this happen?

0
3 comments

do you have .editorconfig file in your project? Code style settings in .editorconfig override IDE formatting preferences if Enable EditorConfig support is ON in Settings | Editor | Code Style

0

Did you try disabling the Enable EditorConfig support  option?

Also, do you have Prettier set up in Settings | Languages & Frameworks | JavaScript | Prettier? If it's configured as a default formatter, IDE own code style preferences are not respected

1

Please sign in to leave a comment.