Repository navigation
refactor: apply mix_lint dot-shorthand fixes in tests and showcase - #1084
Open
leoafarias wants to merge 5 commits into
Open
leoafarias wants to merge 5 commits into
leoafarias wants to merge 5 commits into
Conversation
Apply the quick fixes for unnecessary_styler_constructor and unnecessary_type_name from #1083 across the repo, then dart format: - Nested Stylers use factory shorthands: `.onHovered(BoxStyler().color(c))` -> `.onHovered(.color(c))`. - Styler expressions drop inferable type names: `.fontWeight(FontWeight.w600)` -> `.fontWeight(.w600)`, `.onNot(.widgetState(WidgetState.hovered), ...)` -> `.onNot(.widgetState(.hovered), ...)`. 653 edits in 60 files: 49 test files in mix and mix_chart, and 11 files in the showcase app. No library code in mix or mix_chart changes, and generated *.g.dart files are left to mix_generator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011EP34h1rAB3nkZvg3V3fHi
3 of 4 tasks
…d-fixes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011EP34h1rAB3nkZvg3V3fHi
…d-fixes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011EP34h1rAB3nkZvg3V3fHi
leoafarias
added this pull request to stack #1085
September 30, 2026 16:10
…d-fixes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011EP34h1rAB3nkZvg3V3fHi
The dot-shorthand fixes removed the last use of package:mix/mix.dart in three tests, so dart analyze reported unused_import. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011EP34h1rAB3nkZvg3V3fHi
This branch has not been deployed
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.
Related issue
Stacked on #1083, which adds and fixes the lints. This PR's base is #1083's branch (
refactor/mix-lint-cleanup), so the diff shows only the applied fixes.After #1083 is squash-merged:
main. GitHub does this for you only when the base branch is deleted through GitHub after the merge.main, so the diff doesn't show refactor(mix_lint)!: rename rules, fix false positives, and align with Mix style #1083's files again:git merge origin/maingives the same tree if a force-push is not wanted.Description
Applies the quick fixes for
unnecessary_styler_constructorandunnecessary_type_nameacross the repo, then runsdart format. This brings the tests and the showcase in line with the nested-shorthand style the Mix skill prescribes.mixmix_chartexamples/showcaseNo library code in
mixormix_chartchanges. Seven findings in generated*.g.dartfiles are left alone; they should be fixed inmix_generator's output.Changes
Nested Stylers use factory shorthands (83 edits):
Styler expressions drop type names the parameter type already gives (570 edits):
The fixes removed the last use of
package:mix/mix.dartin threemix_charttests, so those imports are removed too. Without that,dart analyzereportsunused_import, which fails CI's Analyze step.Review Checklist
constconstructors, genericProp.maybeMix, and factories that return a subtype.dart formatand the three removed imports. No strings, comments, or test names changed.dart analyzeinmix_chartis clean after the import removal.mixand the showcase have no new findings, and the showcase also analyzes cleanly against published mix 2.2.0.mix(the 40 changed files), 45 inmix_chart, and all 127 in the showcase (including goldens).packages/mix/lib, which this PR leaves out on purpose.mainornext, so CI runs here after the retarget.Additional Information (optional)
ContextVariantgetters such ashovered. Then.onNot(.widgetState(.hovered), …)could become.onNot(.hovered, …).🤖 Generated with Claude Code
https://claude.ai/code/session_011EP34h1rAB3nkZvg3V3fHi