max-mapper / standard-format

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

report error for valid if statement #171

Closed futurist closed 7 years ago

futurist commented 8 years ago

below code is valid if statement, but cannot be formatted:

      if(!data) getData(url)
      else{
        play()
      }

But cannot be formatted, due to parse error

when changed as below:

      if(!data) { getData(url) }
      else{
        play()
      }

It's ok to be formatted.

feross commented 7 years ago

You should use standard --fix instead of this package. standard-format isn't being actively maintained anymore.