Brian Schermerhorn
Brian Schermerhorn

Reputation: 1431

WebStorm autocomplete React JSX component with required props on NEW LINES

At the moment WebStorm can autocomplete a component name and adds the required props automatically, for example

// currently does
<SomeComponent name={} id={} blah1={} blah2={} />

My issue is some components have many props and I'd prefer WebStorm outputs the autocomplete component with required props on new lines

// I want it to do
<SomeComponent 
  name={} 
  id={}
  blah1={}
  blah2={} 
/>    

How can I accomplish this? I'm actually on IntelliJ if that makes a difference.

Upvotes: 2

Views: 1705

Answers (1)

lena
lena

Reputation: 93868

To have your code formatted in this way, go to Preferences | Editor | Code Style | HTML and set Wrap attributes to Wrap always and and New line before first attribute to When multiline

Upvotes: 4

Related Questions