max-mapper / standard-format

converts your code into Standard JavaScript Format
264 stars 59 forks source link

Don't touch line breaks (or add options for it) #113

Closed philippevk closed 7 years ago

philippevk commented 9 years ago

I think the formatter should not add or remove line breaks anywhere since the standard doesn't say anything about this. Alternatively you could provide an option for this.

Great work btw!

bcomnes commented 9 years ago

Originally we were only aiming to fix standard violations, but esformatter doesn't have enough hooks to make that possible... so at the moment, you will always get some formatting, and unfortunately it will sometimes touch non violating line breaks. If you spot a rule that we can relax or disable, please feel free to bring it up as a sugestion, otherwise work is ongoing to improve the flexibility of formatting.

As for options, a major part of standard's purpose is to minimize options, so any improvements along these lines would need to be flexible enough always be active.

philippevk commented 9 years ago

I'm leaving for the weekend but from what I see it should be possible by setting most of the line break rules to - 1. I'll try something when I get back and keep you posted. Thanks for the fast response!

feross commented 7 years ago

You should use standard --fix instead of this package. standard-format isn't being actively maintained anymore.