riverpod_lint
3.2.0, released 2 weeks ago by an unverified publisher
Riverpod_lint is a static analysis plugin that flags common Riverpod mistakes and offers quick refactorings.
What it does
It runs as an analysis_server_plugin, providing lint rules and assists for Riverpod code. It warns about missing ProviderScope, improper family usage, and offers refactorings to ConsumerWidget variants.
AI-written summary of version 3.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You use Riverpod and want to catch common mistakes early
- You need automated refactorings for ProviderScope or ConsumerWidget patterns
Skip it when
- You prefer to write custom lints or use a different linting framework
Strengths
- Zero runtime cost, integrates with dart analyze
- Provides quick fixes and refactorings
- Keeps codebase consistent with Riverpod best practices
Weaknesses
- Only works with Riverpod, not other state managers
- Requires Dart 3.13 due to analysis_server_plugin dependency
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 10
Add riverpod_lint to analysis_options.yaml under plugins, no build_runner needed
// analysis_options.yaml
plugins:
riverpod_lint: 3.2.0Alternatives
Packages that do the same job and could replace riverpod_lint.
- bloc_lint
Official lint rules for development when using the bloc state management library.
85Compare - flame_lint
A strict and satisfying lint package for Flame, Flutter, or Dart projects.
73Compare - dart_code_linter
A software analytics and static analysis tool for checking code metrics, lint rules, and unused code.
88Compare - bloc_test
A testing library that makes it easy to test blocs and cubits.
82Compare
Works with
Packages commonly used together with riverpod_lint: ones it builds on, ones built on it, and its own family.
- analyzerriverpod_lint depends on itPerforms static analysis of Dart code for tool integration and embedding.
- yamlriverpod_lint depends on itA Dart library for parsing YAML documents into Dart data structures.
- source_spanriverpod_lint depends on itStandard representation for source code locations, spans, and human-friendly error messages.
- riverpodriverpod_lint depends on itA reactive caching and data-binding framework. Riverpod makes working with asynchronous code a breeze.
- analyzer_pluginriverpod_lint depends on itFramework for building plugins for the Dart analysis server
- analysis_server_pluginriverpod_lint depends on itFramework and support code for building plugins for the Dart analysis server.