fprettify icon indicating copy to clipboard operation
fprettify copied to clipboard

define maximum number of empty lines

Open stigh opened this issue 1 year ago • 0 comments
trafficstars

Today fprettify will not allow more than 1 consecutive empty lines. Personally I like to keep 2 empty lines between subroutines and functions for improved readability.

See inspiration from eslint here: https://eslint.style/rules/js/no-multiple-empty-lines. According to eslint documentation:

Some developers prefer to have multiple blank lines removed, while others feel that it helps improve readability. Whitespace is useful for separating logical sections of code, but excess whitespace takes up more of the screen.

I see there is a PR in https://github.com/pseewald/fprettify/pull/106, which seem to have been closed unintentionally. --keep-blank-lines would solve my issue, but I think an even better solution would be to define a maximum value.

stigh avatar Feb 19 '24 13:02 stigh