dart-lang / dart_style

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

[tall-style] Erased trailing comma in list literal #1558

Closed rakudrama closed 2 months ago

rakudrama commented 2 months ago

The formatter removed a trailing comma here:

https://dart-review.googlesource.com/c/sdk/+/383722/1/pkg/compiler/lib/src/js_backend/backend_impact.dart#105

Another example where the erased trailing comma is in the following list:

https://dart-review.googlesource.com/c/sdk/+/383722/1/pkg/compiler/lib/src/js_backend/backend_impact.dart#323

munificent commented 2 months ago

Yes, this is by design. The key idea of the new style is that it automates both adding and removing trailing commas. See #1539 for lots more discussion, in particular this comment.