Search code examples
reactjsphpstormwebstormjetbrains-idetsx

Strange space in WebStorm/PhpStorm 2022 between tags


I'm using React and writing tags in a tsx file. When I use Reformat code, spaces appear instead of newlines. Tell me how to fix this and what could be causing this?

enter image description here


Solution

  • Okay, this was very strange for me. But I figured out what was going on. I have a version of PhpStorm from 2020, which I updated every year until 2022.3. I simply reset the TypeScript settings and reconfigured them again and everything worked as it should. Therefore, as a solution for those who have the same situation: just reset the TypeScript settings and configure them again, do not go into details.

    I’ll assume on my own that this is some kind of outdated setting that was hidden from the interface and it directly affects this behavior. Since I can’t reset it from the interface, only a full reset helps.