millermedeiros / esformatter

ECMAScript code beautifier/formatter
MIT License
970 stars 91 forks source link

FIX: IfStatement format wrong #446 #448

Closed futurist closed 8 years ago

futurist commented 8 years ago

also added tests for default and custom

fixes #446

futurist commented 8 years ago

For it's can pass all test on linux server(also travis-ci), but cannot pass test on my mac,

due to the test [cli invalid config 2], it's produces below different error than linux:

Error: /Users/mac/Projects/github.com/esformatter/test/compare/default/call_expression-in.js Can't parse configuration file '/Users/mac/Projects/github.com/esformatter/test/compare/error/invalid.json'. Exception: Unexpected token l in JSON at position 4

The char after letter token l is space, not \n

So there's an additional commit to fix this. Now can pass tests both on linux and mac.

millermedeiros commented 8 years ago

thanks for doing this!