bloc_signals_lint 0.9.0 copy "bloc_signals_lint: ^0.9.0" to clipboard
bloc_signals_lint: ^0.9.0 copied to clipboard

Custom lint rules and analyzer diagnostics for BlocSignal and CubitSignal.

Changelog #

0.9.0 #

  • Staging release candidate for the 1.0.0 production milestone.
  • Update bloc_signals dependency constraint to ^0.9.0.

0.2.7 #

  • Added 3 footgun prevention lint rules for stateful container lifecycles and disposal (avoid_top_level_bloc_signal_instances, avoid_providing_existing_instance_with_create, avoid_manual_close_on_provided_bloc).
  • Add runnable @example code blocks to AddSuperOnEventFix and PreferReadInCallbacksFix.
  • Add test/src/fixes_test.dart unit test suite for IDE quick fix classes.
  • Update bloc_signals dependency to ^0.2.8.

0.2.5 #

  • Add comprehensive ecosystem package cross-linking table and motto to README.
  • Add quick lint rule descriptions and quick-fix guides.
  • Update bloc_signals dependency to ^0.2.6.

0.2.4 #

  • Tightened analyzer (>=6.8.0 <15.0.0) and custom_lint_builder (>=0.8.0 <0.9.0) dependency constraints to ensure full compatibility with the analyzer Element2 API and pass pub.dev lower-bound downgrade analysis.

0.2.2 #

  • Added full runnable BLoC sample code in example/example.dart demonstrating custom lint rule invariants.

0.2.1 #

  • Added example documentation and pubspec package topics to improve pub.dev score to 160/160.

0.2.0 #

  • Added 3 Flutter UI lint rules:
    • avoid_emit_in_build: Flags state emissions (emit/add) directly inside Flutter Widget.build() methods.
    • avoid_unmanaged_signal_effects: Flags unassigned effect() calls created in Flutter Widget or State scopes.
    • prefer_bloc_signal_provider_read_in_callbacks: Warns on context.watch<T>() inside callback closures (e.g. onPressed).
  • Added automated IDE quick-fixes (Cmd+. / Alt+Enter):
    • AddSuperOnEventFix: Automatically inserts super.onEvent(event);.
    • PreferReadInCallbacksFix: Automatically replaces context.watch<T>() with context.read<T>().

0.1.0 #

  • Initial release of bloc_signals_lint.
  • Custom lint rules and analyzer diagnostics for bloc_signals:
    • avoid_duplicate_event_handlers: Flags duplicate on<E> event handler registrations.
    • require_super_on_event: Enforces super.onEvent(event) calls inside onEvent overrides.
    • avoid_stream_transformers_on_bloc_signal: Flags stream transformer method invocations directly on synchronous state containers.
    • avoid_direct_signal_mutation_outside_bloc: Prevents external code from calling protected emit() methods outside the state container class.
0
likes
160
points
580
downloads

Documentation

API reference

Publisher

verified publisherstonehenge.com

Weekly Downloads

Custom lint rules and analyzer diagnostics for BlocSignal and CubitSignal.

Repository (GitHub)
View/report issues

Topics

#lint #static-analysis #bloc #signals

License

MIT (license)

Dependencies

analyzer, bloc_signals, custom_lint_builder, meta

More

Packages that depend on bloc_signals_lint