style: preserve trailing commas and format all packages#251
Open
spydon wants to merge 2 commits into
Open
Conversation
f54a75f to
d6efdfd
Compare
The json_serializable / json_annotation versions used need Dart 3.8.0. Constraints are left as-is so consumers on Dart 3.8.0 still resolve the 3.8-compatible json versions rather than being forced to 3.9.0.
d6efdfd to
4942f3e
Compare
This was referenced Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add the Dart formatter option to every package that includes
very_good_analysis:(
corbado_auth,corbado_auth_firebase,passkeys,passkeys_android,passkeys_web,passkeys_platform_interface,passkeys_darwin.) The importedvery_good_analysisconfig only ships therequire_trailing_commaslint, not this formatter option, so it was not already set.Run
melos run format(plaindart format .) across the whole repo and commit the result.Why
With
trailing_commas: preserve, an existing trailing comma forces the formatter to keep a collection/argument list split across lines, instead of re-deciding the layout itself. Combined with therequire_trailing_commaslint thatvery_good_analysisalready enforces, this keeps formatting stable and predictable.Now that every package is on Dart 3.8 (#250),
dart formatuses the tall style across the whole repo, so the trailing-comma layout is applied consistently everywhere rather than only in one package.Generated files
Generated
*.g.dartfiles are formatted along with everything else. No exclusion is configured: at Dart 3.8+ the code generators also emit tall style, so runningdart formatover them is effectively idempotent and does not fight the generators.Notes
melos run format:checkpasses (435 files, 0 changed).melos run analyze --fatal-infosstill reports pre-existinginfolints unrelated to this change.Merge order
Stacked on #250 (the Dart 3.8 bump). Merge after #250; the diff will then reduce to just the analysis-option and formatting changes.