graft_lint 1.0.0-alpha.4
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
graftcore package.
- Synchronized versioning directly with the
- New Lint Rule (
RequireDryContractsRule):- Added
require_dry_schema_versionenforcing@override int get schemaVersion => 1;when state classes are used withGraft.dry/super.dry. - Added
require_model_factory_in_dry_stateenforcing@override Function get factory => Model.new;on nestedGraftModelclasses. - Added
require_model_schema_version_in_dry_stateenforcingschemaVersionon nestedGraftModelclasses. - Added
require_dry_default_constructorandrequire_model_default_constructorto verify zero-argument or all-optional constructor signatures for Frame-0 state and model hydration.
- Added
- Expanded
prefer_props_in_graft_state:- Now inspects domain sub-models extending
GraftModelalongsideGraftState, encouragingpropsOf(...)overrides for CPU bitmask diffing and binary serialization.
- Now inspects domain sub-models extending
0.1.2-alpha.5 #
- Architecture Alignment & Rule Hardening:
- Updated
prefer_props_in_graft_staterule to enforceGraftProps get props => propsOf(...)for 1-cycle CPU bitmask diffing. - Expanded
avoid_nested_graft_slotto inspectasync(),compute(), andbuilder()alongsideslot()andslots(). - Enhanced
require_graft_route_observerto detect bothGraftRouteTracker.observerandGraftRouteObserver(), with added support forCupertinoApp. - Marked rule constructors as
constfor optimal Dart Analysis Server performance. - Updated documentation with accurate Graft slot syntax and IDE red error squiggle configuration guides.
- Updated
0.1.2-alpha.1 #
- New Rule (
prefer_tracked_in_graft_state): Warns developers when a domain state class extendingGraftStatedeclares fields without overridingtracked. Guides developers to declareList<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 insidegraft.slotsorslot.
0.1.1-alpha.1 #
- Breaking (Diagnostics): Promoted
avoid_nested_graft_slotrule severity fromWarningtoError(ErrorSeverity.ERROR) by default. - Fixed ambiguous import collision for
LintCodebetweenanalyzerandcustom_lint_builder. - Expanded documentation with rule examples (Bad vs. Good code) and
analysis_options.yamlconfiguration guidelines.
0.1.0-alpha.1 #
- Initial alpha release of
graft_lintanalyzer plugin. - Added
avoid_nested_graft_slotrule to prevent redundant slot nesting. - Added
require_graft_route_observerrule to remind developers to registerGraftRouteTracker.observer.