Skip to main content

graft_lint 1.0.0-alpha.4 copy "graft_lint: ^1.0.0-alpha.4" to clipboard
graft_lint: ^1.0.0-alpha.4 copied to clipboard

Custom lint rules and analyzer plugin for the Graft reactive state management library.

Changelog #

All notable changes to graft_lint will be documented in this file.

1.0.0-alpha.4 #

  • Version Alignment with Graft Core (1.0.0-alpha.4):
    • Synchronized versioning directly with the graft core package.
  • New Lint Rule (RequireDryContractsRule):
    • Added require_dry_schema_version enforcing @override int get schemaVersion => 1; when state classes are used with Graft.dry / super.dry.
    • Added require_model_factory_in_dry_state enforcing @override Function get factory => Model.new; on nested GraftModel classes.
    • Added require_model_schema_version_in_dry_state enforcing schemaVersion on nested GraftModel classes.
    • Added require_dry_default_constructor and require_model_default_constructor to verify zero-argument or all-optional constructor signatures for Frame-0 state and model hydration.
  • Expanded prefer_props_in_graft_state:
    • Now inspects domain sub-models extending GraftModel alongside GraftState, encouraging propsOf(...) overrides for CPU bitmask diffing and binary serialization.

0.1.2-alpha.5 #

  • Architecture Alignment & Rule Hardening:
    • Updated prefer_props_in_graft_state rule to enforce GraftProps get props => propsOf(...) for 1-cycle CPU bitmask diffing.
    • Expanded avoid_nested_graft_slot to inspect async(), compute(), and builder() alongside slot() and slots().
    • Enhanced require_graft_route_observer to detect both GraftRouteTracker.observer and GraftRouteObserver(), with added support for CupertinoApp.
    • Marked rule constructors as const for optimal Dart Analysis Server performance.
    • Updated documentation with accurate Graft slot syntax and IDE red error squiggle configuration guides.

0.1.2-alpha.1 #

  • New Rule (prefer_tracked_in_graft_state): Warns developers when a domain state class extending GraftState declares fields without overriding tracked. Guides developers to declare List<Object?> get tracked => [...] to enable 1-cycle hardware bitmask diffing and 0 GC heap allocations.
  • Expanded avoid_nested_graft_slot: Flagged illegal nesting of slots and scopes inside graft.slots or slot.

0.1.1-alpha.1 #

  • Breaking (Diagnostics): Promoted avoid_nested_graft_slot rule severity from Warning to Error (ErrorSeverity.ERROR) by default.
  • Fixed ambiguous import collision for LintCode between analyzer and custom_lint_builder.
  • Expanded documentation with rule examples (Bad vs. Good code) and analysis_options.yaml configuration guidelines.

0.1.0-alpha.1 #

  • Initial alpha release of graft_lint analyzer plugin.
  • Added avoid_nested_graft_slot rule to prevent redundant slot nesting.
  • Added require_graft_route_observer rule to remind developers to register GraftRouteTracker.observer.
1
likes
140
points
444
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Custom lint rules and analyzer plugin for the Graft reactive state management library.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

analyzer, custom_lint_builder

More

Packages that depend on graft_lint