max-mapper / standard-format

converts your code into Standard JavaScript Format

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

inline functions inside JSX formatted incorrectly.

alinz opened this issue · comments

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.

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

Nice, closing this now.