Workiva / Workiva/over_react

UIP-1639 Update formatting guidelines WRT dartfmt and trailing commas

Open
#25 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Type: documentation
Dominant language
Dart
Stars
432
Forks
57
PR merge metrics
No merged PRs in 30d

Description

Our formatting guidelines currently recommend against using dartfmt/dart_style on over_react code.

We recently discovered that dartfmt is capable of producing significantly more readable over_react code, due to changes in dart_style that treat Flutter code better when nested components use trailing commas.

For more info, see https://github.com/dart-lang/dart_style/issues/549. Thanks to @skybrian for getting the conversation started, and to @matanlurey for suggesting we revisit the issue!

We should upgrade the formatting guidelines to:

  • recommend trailing commas whenever supplying variadic children to a builder, even if it's just one
  • indicate that dartfmt output, while not perfect, is acceptable when trailing commas are used

FYI: @greglittlefield-wf @aaronlademann-wf @jacehensley-wf @clairesarsam-wf @joelleibow-wf

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the repository's formatting guidelines and review the existing advice about dartfmt, dart_style, and trailing commas. Update the guidance to recommend trailing commas for variadic builder children and accept dartfmt output when they are used; done means both requested recommendations are clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.