prettier / eslint-config-prettier

Turns off all rules that are unnecessary or might conflict with Prettier.
MIT License
5.39k stars 255 forks source link

Problem with setting "curly" #219

Closed gabmontes closed 2 years ago

gabmontes commented 2 years ago

This config turns off curly by default but that seems inconsistent with Prettier's stance about braces:

Here are a few examples of things that are out of scope for Prettier:

  • Adding/removing {} and return where they are optional.

https://prettier.io/docs/en/rationale.html#what-prettier-is-_not_-concerned-about

In addition, given that this config should be put last in the "extends" list, it prevents any other previous configs to set the rule and forces to explicitly configuring the rule in the "rules" section.

IMO the following line has to be removed.

https://github.com/prettier/eslint-config-prettier/blob/3dfe8c6301897260486e13bc22712e824958c422/index.js#L10

Would really appreciate your thoughts on this.

lydell commented 2 years ago

Hi! Have you read the documentation? https://github.com/prettier/eslint-config-prettier#special-rules and https://github.com/prettier/eslint-config-prettier#curly

lydell commented 2 years ago

Closing because no response.