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

Arrow Function Parentheses option is incompatible with ESLint #5309

Closed
miraage opened this issue Oct 29, 2018 · 5 comments
Closed

Arrow Function Parentheses option is incompatible with ESLint #5309

miraage opened this issue Oct 29, 2018 · 5 comments
Labels
lang:javascript Issues affecting JS locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:option request Issues requesting a new option. We generally don’t accept these unless there is technical necessity. type:question Questions and support requests. Please use Stack Overflow for them, not the issue tracker.

Comments

@miraage
Copy link

miraage commented Oct 29, 2018

We use both ESLint and Prettier.
ESLint is configured as [2, "as-needed", { "requireForBlockBody": true }].

There are tons of developers who follows Airbnb JS codestyle, which recommends exactly this configuration.

How can we configure Prettier to avoid mangling our codebase? Is there any chance to provide an option to either disable this behavior or make it compatible with ESLint?

@j-f1
Copy link
Member

j-f1 commented Oct 29, 2018

We don’t have such an option and we likely won’t be providing it: https://prettier.io/docs/en/option-philosophy.html

However, you can use eslint-config-prettier to override AirBnB’s style guide.

@j-f1 j-f1 added lang:javascript Issues affecting JS type:option request Issues requesting a new option. We generally don’t accept these unless there is technical necessity. type:question Questions and support requests. Please use Stack Overflow for them, not the issue tracker. labels Oct 29, 2018
@j-f1 j-f1 closed this as completed Oct 29, 2018
@miraage
Copy link
Author

miraage commented Oct 29, 2018

@j-f1 I believe it's possible just not to run this transformation by providing smth like "disabled" option.

@lydell
Copy link
Member

lydell commented Oct 29, 2018

@ivanguimam
Copy link

Sad the prettier not be compatible with Airbnb

@aboyton
Copy link
Contributor

aboyton commented Dec 6, 2018

Actually I believe that Airbnb are planning on changing to always require parens. airbnb/javascript#1863

@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Mar 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lang:javascript Issues affecting JS locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:option request Issues requesting a new option. We generally don’t accept these unless there is technical necessity. type:question Questions and support requests. Please use Stack Overflow for them, not the issue tracker.
Projects
None yet
Development

No branches or pull requests

5 participants