UIP-1639 Update formatting guidelines WRT dartfmt and trailing commas
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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