Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config option for keeping brackets around single parameter arrow functions #1725

Closed
ismail-syed opened this issue May 25, 2017 · 1 comment
Closed
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Comments

@ismail-syed
Copy link

ismail-syed commented May 25, 2017

Currently prettier strips out brackets around single parameter arrow functions.

[0, 1, 2].forEach((num) => console.log(num));

outputs to

[0, 1, 2].forEach(num => console.log(num));

Some teams prefer the consistency of having the brackets always surrounding the parameters. Can this be a config option? With some guidance, I'd be interested in contributing this project by adding support for this config option.

@lydell
Copy link
Member

lydell commented May 25, 2017

Hi, thanks for your issue! :)

This is a duplicate of #812, so I’m going to close this one. I’ve renamed #812 so that it is easier to find while searching.

@lydell lydell closed this as completed May 25, 2017
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jul 7, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jul 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

No branches or pull requests

2 participants