dart-lang / dart_style

An opinionated formatter/linter for Dart code
https://pub.dev/packages/dart_style
BSD 3-Clause "New" or "Revised" License
645 stars 117 forks source link

[tall] Preserve blank line between elements in list? #1469

Closed munificent closed 3 months ago

munificent commented 3 months ago

In the new tall style, it will currently preserve a blank line before a comment inside a list, as in:

stuff = [
  element,

  // blank line before this
  element,
];

But if there is a blank between elements with no comment, the blank line is discarded. So this:

stuff = [
  element,

  element,
];

Becomes:

stuff = [
  element,
  element,
];

Should we allow a discretionary newline in there and preserve it? The old style does.