max-mapper / standard-format

converts your code into Standard JavaScript Format
264 stars 59 forks source link

inline functions inside JSX formatted incorrectly. #158

Closed alinz closed 8 years ago

alinz commented 8 years ago
const Foobar = (props) => {
  return (
    <button onClick={() => console.log('click')}>
    </button>
  )
}

transforms into

const Foobar = (props) => {
  return (
  <button onClick={;() => console.log('click')}>
  </button>
  )
}

I undrestand that having ; before function makes it safe when it minfies, but in this case, we don't need it.

millermedeiros commented 8 years ago

just released esformatter-semicolon-first@1.2.0 with the fix!

feross commented 8 years ago

Nice, closing this now.