-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Labels
Description
Prettier 1.11.1
Playground link
--print-width 100
--no-semi
--single-quote
--trailing-comma es5Input:
overlayStore.showText(
"Error: Not logged in",
"Please reload the page and log in.",
() => callback(null, res.body.error)
);
overlayStore.showText(
"Error: Not authorized",
"Please reload the page and log in with the right user.",
() => callback(null, res.body.error)
);Output:
overlayStore.showText('Error: Not logged in', 'Please reload the page and log in.', () =>
callback(null, res.body.error)
)
overlayStore.showText(
'Error: Not authorized',
'Please reload the page and log in with the right user.',
() => callback(null, res.body.error)
)Expected behavior:
Short version: I'd really like to keep those 3 parameters in 3 separate lines. At least to make sure that I'm not making a new line in the middle of a parameter.
Having the arrow of an arrow function on separate line can be quite confusing. In this example, I'd really like to have both functions be organised the same way, to make sure that I can visually check that all of them are in an arrow function and not called directly. Right now, prettier makes such organisation impossible.
Reactions are currently unavailable