royriojas / esformatter-jsx

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

Weird semicolon issue #78

Closed schleumer closed 8 years ago

schleumer commented 8 years ago

if i have a script like this:

const obj = {
  fn() {
    return {
      "hello": "world"
    }
  }
}

a exception is thrown: //==> Error: Unexpected token (5:5).

It's a valid expression.

royriojas commented 8 years ago

You're totally right. That's valid syntax. I will take care of it today.

Thanks for reporting it.

royriojas commented 8 years ago

demo

schleumer commented 8 years ago

Thanks!