compile-hero icon indicating copy to clipboard operation
compile-hero copied to clipboard

Puts new line after < and {

Open RoosterH opened this issue 4 years ago • 4 comments

Today after updating my Mac OS and VSCode, my VSCode starts adding newline after open < and {. After disabling/enabling all the extensions I have. I found it's related to compile-hero.

<
    div className = "event-form" >
<
    div className = "event-form-header" >
<
    h4 > {
            userName
        }
        's event</h4> <
        hr className = "event-form__hr" / >
<
    /div> 

I am not sure what happened. I did not change any setting at all. Is there anyway to disable it?

RoosterH avatar Aug 30 '20 00:08 RoosterH

Today after updating my Mac OS and VSCode, my VSCode starts adding newline after open < and {. After disabling/enabling all the extensions I have. I found it's related to compile-hero.

<
    div className = "event-form" >
<
    div className = "event-form-header" >
<
    h4 > {
            userName
        }
        's event</h4> <
        hr className = "event-form__hr" / >
<
    /div> 

I am not sure what happened. I did not change any setting at all. Is there anyway to disable it?

image

Wscats avatar Aug 30 '20 02:08 Wscats

Tried with Compile Hero: Off but still adds newline.

RoosterH avatar Aug 30 '20 02:08 RoosterH

Tried with Compile Hero: Off but still adds newline.

Can you provide me with your source code and what format is it in? Did the code mess up after saving?

Wscats avatar Aug 30 '20 03:08 Wscats

I created a code snippet that can reproduce the issue, it's not syntax correct btw. Yes, codes got re-formatted after saving.

import React, {
    useContext,
    useEffect,
    useState
} from 'react';

const NewCar = setFieldValue => {
    return <React.Fragment >
        <
        ErrorModal error = {
            error
        }
    onClear = {
        clearError
    }
    /> {
        isLoading && ( <
            div className = "center" >
            <
            LoadingSpinner / >
            <
            /div>
        )
    } {
        carForm()
    } <
    /React.Fragment>


}

export default NewCar;

Screen Shot 2020-08-30 at 10 43 11 PM

RoosterH avatar Aug 31 '20 05:08 RoosterH