max-mapper / standard-format

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

Spread operator not working. #145

Closed sorahn closed 8 years ago

sorahn commented 8 years ago

Doesn't look like the spread operator syntax is very happy right now.

function API_URL (base, endpoint, filters = {}) {
  return base.concat(endpoint, '?', serialize({...filters, json: 1}))
}

results in: SearchActions.js: Error: Line 29: Unexpected token ...

bcomnes commented 8 years ago

The formatter basically doesn't have support for ES6 yet. We hope to correct this soon.

sorahn commented 8 years ago

Yeah, I Think I found out after some more googling last night that this an espree issue. Thanks for the quick reply. :)

yoshuawuyts commented 8 years ago

It appears the object rest spread was added for the v0.8.0 milestone in Sept 2015, it doesn't appear to be working on more complicated uses tho

millermedeiros commented 8 years ago

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

feross commented 8 years ago

Nice!