signals-lint

Detect reactive anti-patterns and deprecated signals.dart usage in Dart and Flutter codebases.

803|85|Updated Nov 18, 2023
One-click install
npx skills add https://github.com/rodydavis/signals.dart --skill signals-lint
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: signals-lint
Source: https://github.com/rodydavis/signals.dart/tree/main/skills/signals-lint
Command: npx skills add https://github.com/rodydavis/signals.dart --skill signals-lint

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Signals-lint helps developers catch common reactive performance and correctness problems early by surfacing standardized diagnostics and offering automated refactors for Flutter and signals.dart usage patterns.

Core Features & Use Cases

  • Prevents signal/state anti-patterns: Flags creation of signals/computeds inside Flutter build methods to avoid state resets and unintended reactivity churn.
  • Cleans up deprecated APIs: Detects deprecated BuildContext.watch()/unwatch() patterns and legacy with SignalsMixin usage, guiding you toward modern widget composition.
  • Improves readability and correctness: Enforces API style choices like named builders and unified options to keep reactive widget construction consistent.
  • Automates common migrations: Provides quick-fixes such as wrapping with SignalBuilder, converting Stateless/Stateful widgets into their signal-aware counterparts, migrating SignalsMixin, and converting legacy Watch to SignalBuilder.

Quick Start

Enable the custom_lint analyzer plugin and add signals_lint as a dev dependency, then open your Flutter code and use the IDE quick-fix on flagged signals-related widgets.

Frequently Asked Questions about signals-lint

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix deprecated signals.dart usage in my Flutter project?

This tool detects deprecated signals.dart usage in Flutter and provides IDE quick-fixes to automatically migrate legacy patterns like `BuildContext.watch()` and `with SignalsMixin` to modern widget composition. You need the `custom_lint` analyzer plugin enabled.

Why does creating signals inside a Flutter build method cause problems?

Creating signals inside a Flutter build method causes state resets and unintended reactivity churn. This tool flags these reactive anti-patterns by producing standardized lint diagnostics, helping you catch common reactive performance and correctness problems early.

How do I convert a StatelessWidget to use signals in Dart?

To convert a StatelessWidget to use signals in Dart, this tool provides automated IDE quick-fixes that wrap your widgets with `SignalBuilder` or convert them into their signal-aware counterparts. It enforces consistent API style choices for reactive widget construction.

Does custom_lint support automated refactors for signals_avoid and signals_prefer rules?

Yes, `custom_lint` supports automated refactors through this tool's `signals_avoid_*` and `signals_prefer_*` rules. It applies quick-fix transforms like `SignalBuilder` wrapping, widget conversions, and legacy `Watch` migrations directly in your IDE.

What is the best way to migrate legacy Watch widgets to SignalBuilder?

The best way to migrate legacy `Watch` widgets to `SignalBuilder` is using this tool's automated IDE quick-fixes. It detects the deprecated usage pattern and provides a standardized transform action to update your reactive widget composition safely.