Closed sospedra closed 7 years ago
Writing some tests for this. Looks like arrow functions have some hooks in esformatter now so I might actually be able to fix this potentially.
Let me know if you need some help.
The issue seems to come from the the indentation on ObjectExpression's.
return array.map(el => ({
inc: el.val + 1,
dec: el.val - 1
}})
Where the rule is primarily used to make objects look like this:
{
foo: bar
}
Because its nested inside of an arrow function inside of the the map , its adding two layers of indentation.
I don't see an easy way to fix this at the moment. Any thoughts on the matter?
You should use standard --fix
instead of this package. standard-format
isn't being actively maintained anymore.
Giving the following example:
It adds 4 spaces of indentation instead of 2