Create a file in the project root: .editorconfig with the contents
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
Adjust ident_size for yourself.
Restart WebStorm, accept that WebStrom must use the editor configuration file.
Press: ctrl + alt + L
Or: Code> Conversion Code
source
share