flutter_skill_lints 0.5.6
flutter_skill_lints: ^0.5.6 copied to clipboard
Analyzer plugin companion for the building-flutter-apps skill's Dart and Flutter guardrails.
Changelog #
0.5.6 - 2026-05-13 #
- Rewrote
arch_domain_importcorrection message to guide users toward Value Objects (sealed Freezed class in/domain/value_objects/) for shared primitive logic and entity getters for one-off derivations. Old message ("Move Flutter/package dependencies out of domain entities") was misleading — pure-Dartcore/extensions/imports are also blocked, by design. Cross-references SKILL.md Critical Rules 11 and 12.
0.5.5 - 2026-05-12 #
- Added
avoid_run_zoned_guarded(AST rule) to flagrunZonedGuarded(...)calls. Per Flutter 3.3+ guidance (docs.flutter.dev/testing/errors), replace with the three-hook pattern:FlutterError.onError,PlatformDispatcher.instance.onError, andIsolate.current.addErrorListener.runZonedGuardedmisses platform-channel async errors. Catches direct calls and aliasedimport 'dart:async' as a;calls. Complements the existingcrash_run_zoned_guarded_legacyscanner rule (which permits a "legacy" escape hatch); enableavoid_run_zoned_guardedfor a hard ban. - Registered a quick-fix that rewrites
runZonedGuarded(body, onError)into the canonical three-hook scaffold + inlined body. The fix infers the reporter call from the originalonErrorbody (defaults toprintwhen unknown). User customizes the reporter after applying. - Added
require_main_error_hooksrule. Any top-level function whose body callsrunApp(...)must wire all three hooks. Coversmain()AND bootstrap wrappers (e.g.runRepem,bootstrap,mainCommon). Escape hatch: add// flutter_skill_lints:configure_error_hooks_elsewhereinside the body to opt out when hooks live in an extracted helper. - Bumped Flutter skill rule count to 110 and diagnostic count to 117.
0.5.4 - 2026-05-12 #
- Added
router_gorouter_ofto flagGoRouter.of(context).{go,push,replace, pushReplacement,goNamed,pushNamed,replaceNamed}calls. Typed routes (const FooRoute(...).push<T>(context)/.go(context)) are the SSOT for navigation — they survive route renames and stay refactor-safe. - Added
router_untyped_navigator_pushto flagNavigator.{push,pushReplacement,pushAndRemoveUntil}(incl.Navigator.of(context).…) when paired withMaterialPageRoute,CupertinoPageRoute, orPageRouteBuilder. Use a typed@TypedGoRoutethenconst FooRoute(...).push<T>(context). - Bumped Flutter skill rule count to 108 and diagnostic count to 115.
- Refreshed README example,
doc/building-flutter-apps-lint-coverage.md, andreferences/common-patterns.mdCritical Rules + Navigation anti-pattern block.
0.5.3 - 2026-05-12 #
- Added
riverpod_feature_notifier_keepaliveto flag non-family feature presentation notifiers that auto-dispose without an explicit ephemeral-state rationale. - Extended the gated plugin smoke to assert the new diagnostic in a temporary Flutter app loaded through the Dart analyzer plugin system.
0.5.2 - 2026-05-12 #
- Added
avoid_mounted_check_in_finallyto flagif (!ref.mounted) return;(andcontext.mounted/ baremounted) shapes insidefinallyblocks.return;infinallyswallows in-flight exceptions from thetrybody. Ships a quick-fix that rewrites the early-return into anif (mounted) { ... }guard around the trailing statements. - Bumped additional analyzer rule count to 81 and quick-fix count to 64.
- Refreshed README counts and
doc/building-flutter-apps-lint-coverage.mdto list the new rule.
0.5.1 - 2026-05-11 #
- Removed stale
flutter_skill_lintsversion pins from README, example analysis options, and project-config test fixtures. The plugin block now matches the companion skill's unpinnedflutter_skill_lintssetup while keeping the documentedriverpod_lintprerelease pin. - Clarified that
dart analyzeis the analyzer/plugin gate and can report project-config drift through Dart analysis units, but does not replaceflutter pub getor pub.dev package validation for completepubspec.yamlchecks. - Refreshed coverage docs to the current registered surface: 105 Flutter-skill warning rules, 112 Flutter-skill diagnostic codes, 80 additional warning rules, 63 fixes, and 1 assist.
- Updated
flutter_skill_project_configwording from validation language to drift-reporting language; behavior is unchanged.
0.5.0 - 2026-05-11 #
- Added
router_complex_extrato flag GoRouter typed-route$extra,GoRouterState.extrareads, and directextra:navigation payloads. Route state must survive serialization, redirects, reloads, and modal pops; pass stable IDs or configure an explicitextraCodecinstead. - Bumped Flutter skill warning rule count to 105 and diagnostic code
count to 112, and refreshed README plus
doc/building-flutter-apps-lint-coverage.mdto list the new rule.
0.4.0 - 2026-05-10 #
- Added analyzer diagnostics for the remaining Dart-source drift checks:
riverpod_select_arrow_syntax,riverpod_mutation_experimental_warning,arch_repository_generated_extends,state_freezed_nullable_error, andcrash_run_zoned_guarded_legacy. - Tightened
riverpod_keepalive_familyso codegen family providers with positionalRef ref, valueparameters are reported, not only providers withrequirednamed parameters. - Added
riverpod_auto_dispose_keepalive_dependenciesto flag computed auto-dispose providers whose same-file watched dependencies are all knownkeepAlive, matching thebuilding-flutter-appsprovider decision tree. - Allowed documented
@Riverpod(keepAlive: true)family workarounds for the open Riverpod TickerMode assertion issuerrousselGit/riverpod#4709. - Added extra false-positive coverage for non-Riverpod
selectAPIs, keep-alive providers without family arguments, generated notifier classes, Riverpod-generated provider classes named*Repository, Freezed DTOs with nullable error fields, non-notifier/qualifiedMutation<T>usages,Mutation<T>declarations, andrunZonedGuardeddeclarations/comments. - Documented that non-Dart drift checks remain owned by
check_drift.sh/CI because analyzer plugin diagnostics attach to Dart analysis units.
0.3.0 - 2026-05-10 #
- Expanded the Flutter skill analyzer surface with extended architecture, Freezed, routing, ShowcaseView, Flutter optimization, persistence, crash reporting, service, mixin, state, UI, and test diagnostics.
- Added
use_unawaited_for_fire_and_forget_futuresand broadened project configuration checks for analyzer plugins, strict analysis, generated-file excludes, Freezed annotation ignores,explicit_to_json, prohibited lint plugin dependencies, and deterministic Flutter Driver entrypoints. - Tightened migrated
many_lints-style coverage with additional false-positive tests, source scanner regression tests, and updated rule registration. - Refreshed README rule counts, example configuration, and lint coverage documentation for the expanded diagnostic set.
0.2.0 - 2026-05-07 #
- Documentation pass: rewrote
README.mdfor faster onboarding, added a Quick Start with copy-pasteanalysis_options.yaml, a tighter rule-group table, and a Troubleshooting section. - Fixed the license badge link in the README.
0.1.1 - 2026-05-07 #
- Added
avoid_constant_switches, a dead-logic warning forswitchstatements and expressions that switch on literals, const variables, or static const fields. - Added automatic release tagging after successful
mainCI, followed by tag-based pub.dev publishing and GitHub Release creation. - Split the migrated scanner surface into one registered analyzer rule per
diagnostic ID, matching
many_lints' specific rule-registration style. - Re-ran the
many_lints 0.4.0inventory audit, added the remaining allowed rules frommany_lints, includingprefer_class_destructuring, and kept the configured false-list diagnostics, including Cubit suffix checks, out of the default Flutter skill profile.
0.1.0 - 2026-05-06 #
- Initial analyzer plugin scaffold.
- Added Flutter skill rules for Riverpod async safety, mounted guards,
legacy Riverpod APIs, dynamic/null-bang usage, widget helper methods,
shrinkWrap, GoRouter pop guards, Freezed class shape, showcase key filtering, route-param throws, repository initialization, and synchronous notifier initialization. - Added additional Dart/Flutter analyzer coverage inspired by
many_lints: 79 default warning rules, 61 fixes, and 1 assist. - Added migrated Dart-source checks from the Flutter skill scanner.
- Added
flutter_skill_project_configso stale analyzer configuration andbuild.yamlJSON settings report through analyzer diagnostics. - Added a gated Flutter integration smoke with
riverpod_lint 3.1.4-dev.3.