millermedeiros / esformatter

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

Conflicting formatting options #489

Open oliversalzburg opened 7 years ago

oliversalzburg commented 7 years ago

So I have this function:

const operation = () => ( {
    foo : "1",
    somethingLong : 2
} );

This is exactly how I want it formatted. But with our current esformatter rules, we get this:

const operation = () => ( {
    foo : "1",
    somethingLong : 2
});

So I figured I should set ObjectExpressionClosingBrace to 1, right? But now every statement where I assign an object hash, gets a trailing whitespace:

operation.fun = {
    call : operation
} ;

So I either get one error or another. And I don't see a rule to remove whitespace around the semicolon either.

I'm not sure if this is a bug or just a request for help, but I don't know what's going on :D

Rules: rules.esformatter.txt