Sunil Kumar Das
Sunil Kumar Das

Reputation: 419

How to add a new line after return keyword for JavaScript in WebStorm?

From this code format:

return ( <div>
        <h1>The Home Page</h1>
        <form onSubmit={ submitFormHandler }>
            <div>
                <label htmlFor='email'>Your Email Address</label>
                <input type='email' id='email' ref={ emailInputRef }></input>
            </div>
            <button> Send feedback</button>
        </form>
    </div>
);

...to this, I want!

return ( 
    <div>
        <h1>The Home Page</h1>
        <form onSubmit={ submitFormHandler }>
            <div>
                <label htmlFor='email'>Your Email Address</label>
                <input type='email' id='email' ref={ emailInputRef }></input>
            </div>
            <button> Send feedback</button>
        </form>
    </div>
);

Please tell me the setting to achieve the expected format.

Upvotes: 0

Views: 113

Answers (1)

Sunil Kumar Das
Sunil Kumar Das

Reputation: 419

It turns out that it was a Prettier package way of formatting.

Upvotes: 1

Related Questions