flutter_hooks_lint_plugin
0.8.0, released 3 months ago by an unverified publisher
A Dart analyzer plugin providing lint rules for flutter_hooks.
What it does
It detects missing or unnecessary keys in useEffect calls and identifies nested hooks inside control flow statements. It helps enforce proper rules of hooks and maintain clean hook code.
AI-written summary of version 0.8.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are using flutter_hooks in your project
- You want to enforce missing/unnecessary key checks for useEffect
- You want to prevent nested usage of hooks inside control flow
Skip it when
- You are not using flutter_hooks in your application
Strengths
- Catches common bugs with missing dependencies in useEffect
- Prevents rules of hooks violations like nesting hooks in control flow
- Configurable via analysis_options.yaml
Weaknesses
- Requires analyzer plugin configuration in analysis_options.yaml and IDE restarts
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 5
Add the plugin directive to analysis_options.yaml and run flutter pub get.
plugins:
flutter_hooks_lint_plugin:
version: ^0.8.0
diagnostics:
exhaustive_keys: true
rules_of_hooks: trueAlternatives
Packages that do the same job and could replace flutter_hooks_lint_plugin.
- very_good_analysis
Lint rules for Dart and Flutter used internally at Very Good Ventures.
91Compare - lints
Official Dart team lint rules for core and recommended static analysis settings.
86Compare - bloc_lint
Official lint rules for development when using the bloc state management library.
85Compare - pedantic_mono
Recommended lints for Flutter apps, packages, and plugins to encourage good coding practices.
85Compare
Works with
Packages commonly used together with flutter_hooks_lint_plugin: ones it builds on, ones built on it, and its own family.
- analyzerflutter_hooks_lint_plugin depends on itPerforms static analysis of Dart code for tool integration and embedding.
- yamlflutter_hooks_lint_plugin depends on itA Dart library for parsing YAML documents into Dart data structures.
- loggingflutter_hooks_lint_plugin depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- analyzer_pluginflutter_hooks_lint_plugin depends on itFramework for building plugins for the Dart analysis server
- analysis_server_pluginflutter_hooks_lint_plugin depends on itFramework and support code for building plugins for the Dart analysis server.