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

Option Request: configurable empty multiple lines #4439

Closed
manuel-di-iorio opened this issue May 8, 2018 · 3 comments
Closed

Option Request: configurable empty multiple lines #4439

manuel-di-iorio opened this issue May 8, 2018 · 3 comments
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Comments

@manuel-di-iorio
Copy link

manuel-di-iorio commented May 8, 2018

I'm using prettier alongside eslint with the airbnb style rule: "no-multiple-empty-lines": ["error", { "max": 2 }]

Due to prettier, unfortunally this:

a = 1


b = 2

Becomes:

a = 1

b = 2

As I said in the prettier-eslint issue (prettier/prettier-eslint#176), opinionated behavior should only be the default and always should be configurable, to allow maximum flexibility of this awesome tool.

Ref: #1613

There are already some options in prettier, but this is missing unless it's not documented: https://prettier.io/docs/en/options.html

@kachkaev
Copy link
Member

kachkaev commented May 8, 2018

It is unlikely that this option will be added @manuel-di-iorio. See Prettier's option philosophy.

@manuel-di-iorio
Copy link
Author

manuel-di-iorio commented May 8, 2018

Excuse me sir but the option philosophy is inconsistent, if there are already 15 options, why not extend it to cover all formatting behaviors 🤔

I mean, I understand that adding new options is not possible anymore, was only thinking about. Closing this issue :)

@kachkaev
Copy link
Member

kachkaev commented May 8, 2018

Each of the Prettier options would not exist if could be avoided. They either have a legacy background or a very long community discussion (e.g. #812).

What you are proposing is a purely stylistic change, which can be easily skipped without any harm to code executability and readability.

By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles.

@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Aug 24, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Aug 24, 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