A formatting comparison.
How will the two tools format the following input code:
export const f = function(a) { if (a === 0) { return []; } return [1,2,3,4,a].map(int => int * 2); }
Standard via standard --fix
:
export const f = function (a) { if (a === 0) { return [] } return [1, 2, 3, 4, a].map(int => int * 2) }
Prettier via prettier
:
export const f = function (a) {
if (a === 0) {
return [];
}
return [1, 2, 3, 4, a].map((int) => int * 2);
};