bloc_lint
0.4.3, released 8 weeks ago by bloclibrary.dev
Official lint rules for development when using the bloc state management library.
What it does
Provides official static analysis lint rules specifically designed for applications using the bloc state management library. It helps enforce best practices, naming conventions, and architectural constraints across your codebase.
AI-written summary of version 0.4.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are developing a Flutter or Dart application using the bloc or cubit state management library.
- You want to enforce consistent architecture and style guidelines across a team working with blocs.
Skip it when
- Your project does not use the bloc or cubit state management library.
- You prefer general-purpose lints and do not want bloc-specific architectural restrictions.
Strengths
- Provides official rules directly from the creators of the bloc library.
- Includes recommended rules sets that can be easily included in your analysis_options.yaml.
Weaknesses
- Strictly tied to the bloc ecosystem.
- Limited utility outside of bloc-based architectures.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- Yes (build_runner)
- Direct dependencies
- 7
Add the dev dependency and include package:bloc_lint/recommended.yaml in your analysis_options.yaml.
include: package:bloc_lint/recommended.yamlAlternatives
Packages that do the same job and could replace bloc_lint.
- flame_lint
A strict and satisfying lint package for Flame, Flutter, or Dart projects.
73Compare - riverpod_lint
Riverpod_lint is a static analysis plugin that flags common Riverpod mistakes and offers quick refactorings.
80Compare - bdd_framework
Create BDD tests in Dart code with readable error messages and Gherkin feature file export.
77Compare - very_good_analysis
Lint rules for Dart and Flutter used internally at Very Good Ventures.
91Compare
Works with
Packages commonly used together with bloc_lint: ones it builds on, ones built on it, and its own family.
- globbloc_lint depends on itA file and directory globbing library that supports Bash-style path matching and listing.
- json_annotationbloc_lint depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- checked_yamlbloc_lint depends on itProvides checkedYamlDecode to give detailed errors when decoding YAML with json_serializable.
- blocSame familyA Dart library for implementing the BLoC pattern with Cubits and Blocs.
- flutter_blocSame familyFlutter widgets to easily integrate blocs and cubits for state management.
- bloc_testSame familyA testing library that makes it easy to test blocs and cubits.
- bloc_concurrencySame familyCustom event transformers for the bloc state management package.
- bloc_toolsBuilt on bloc_lintCommand-line tools for generating and linting bloc and cubit components.