royriojas / esformatter-jsx

esformatter plugin: format jsx files (or js files with Facebook React JSX Syntax)
MIT License
142 stars 25 forks source link

Formatting error #114

Open theSouthSea opened 6 years ago

theSouthSea commented 6 years ago

Before formatting:

const render = () => ReactDOM.render(
    <Counter value={ store.getState() } onIncrement={() => store.dispatch({type: 'INCREMENT'})} onDecrement={() => store.dispatch({type: 'DECREMENT'})}
    />,
    document.getElementById('root')
);

After formatting:

const render = () => ReactDOM.render(
    <Counter value={ store.getState() } onIncrement={ () => store.dispatch({
                                                      type: 'INCREMENT'
                                                  }) } onDecrement={ () => store.dispatch({
                                                                                                                                                                                                                          type: 'DECREMENT'
                                                                                                                                                                                                                      }) } />,
    document.getElementById('root')
);