How set indent html tags in jsx (React component)?
in "Settings->Editor->Code Style->HTML" all indents setted to 2;
in "Settings->Editor->Code Style->JavaScript" all indents setted to 4;
But react file(js) is indented on 4 spaces.
in "Settings->Editor->Code Style" menu "Detect and use existing file indents" disabled.
How to set separated indents for React components?
请先登录再写评论。
JSX is indented according to JavaScript indent options (Settings | Editor | Code Style | JavaScript); please make sure to set both Indent and Continuation Indent to 2 there and disable EditorConfig support in Settings | Editor | Code Style
Please vote for https://youtrack.jetbrains.com/issue/WEB-16776 if you want JSX to get its own code style settings, it's planned, but there is no timeline yet.
Thanks for your answer, Elena.
But i want indent for JS(TS) - 4 spaces, for HTML - 2 (because html code in width more bigger, than JS)
in one file...