Viewing version 0.1.0. Open the latest package page.
bloc_lint
0.1.0Set of lint rules for the Flutter BLoC library.
Readme
Bloc Lint
Custom linter rules for Flutter projects using the bloc library. This package is based on dart_custom_lint package.
Usage
Add the following to your pubspec.yaml file:
dev_dependencies:
custom_lint: ^0.7.0
bloc_lint: ^0.1.0
Add the following to your analysis_options.yaml file:
analyzer:
plugins:
- custom_lint
That's it! After running pub get (and possibly restarting their IDE), users should now see our custom lints in their
Dart files. You can also run dart pub custom_lint to run the linter in your CLI.
Tests
The example folder contains a dart project to unit test the rules. (see custom_lint readme for more info)
Implemented Rules
Changelog
0.1.0 - 2024-11-10
- Initial release
- New rules implemented:
- avoid_public_methods_on_bloc
- avoid_public_properties_on_bloc_and_cubit
- event_base_class_suffix
- prefer_multi_bloc_listener
- prefer_multi_bloc_provider
- prefer_multi_repository_provider
- state_base_class_suffix
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'bloc_lint:0.1.0'pubspec.yaml
name: bloc_lint
version: 0.1.0
description: Set of lint rules for the Flutter BLoC library.
repository: https://github.com/vmichalak/bloc_lint
issue_tracker: https://github.com/vmichalak/bloc_lint/issues
environment:
sdk: ">=3.3.3 <4.0.0"
dependencies:
analyzer: ^6.7.0
analyzer_plugin: ^0.11.3
custom_lint_builder: ^0.7.0
dev_dependencies:
very_good_analysis: ^6.0.0
test: ^1.25.8
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.1.0 | Cached · Upstream SHA-256 matched | Download | fcf80877…34fc65 |
| 0.2.0-dev.0 | Cached · Upstream SHA-256 matched | Download | 634c3b6e…f9a46e |
| 0.2.0-dev.1 | Cached · Upstream SHA-256 matched | Download | 4921ede3…1ebaf8 |
| 0.2.0-dev.2 | Cached · Upstream SHA-256 matched | Download | e4b48eb2…dcfd9b |
| 0.2.0-dev.3 | Cached · Upstream SHA-256 matched | Download | 03629e15…679c85 |
| 0.2.0-dev.4 | Cached · Upstream SHA-256 matched | Download | a3f44e77…fd9f22 |
| 0.2.0-dev.5 | Cached · Upstream SHA-256 matched | Download | 40ae2585…9df805 |
| 0.2.0-dev.6 | Cached · Upstream SHA-256 matched | Download | d6e5a3f4…1dec63 |
| 0.2.0 | Cached · Upstream SHA-256 matched | Download | af723805…147c36 |
| 0.2.1 | Cached · Upstream SHA-256 matched | Download | 116bfd31…c64ae3 |
| 0.3.0 | Cached · Upstream SHA-256 matched | Download | c93fcf61…1a636b |
| 0.3.1 | Cached · Upstream SHA-256 matched | Download | 9e0d71bb…81288f |
| 0.3.2 | Cached · Upstream SHA-256 matched | Download | c7f09846…1c19d4 |
| 0.3.3 | Cached · Upstream SHA-256 matched | Download | 5c1325b3…fc0270 |
| 0.3.4 | Cached · Upstream SHA-256 matched | Download | 0bfcb288…f94685 |
| 0.3.5 | Cached · Upstream SHA-256 matched | Download | 4ba9c78d…5e0f38 |
| 0.3.6 | Cached · Upstream SHA-256 matched | Download | 4218f1b2…bf5843 |
| 0.3.7 | Cached · Upstream SHA-256 matched | Download | 48d141f6…44ccf4 |
| 0.4.0 | Cached · Upstream SHA-256 matched | Download | e40b5782…a46f79 |
| 0.4.1 | Cached · Upstream SHA-256 matched | Download | 5bf965e3…4aba71 |
| 0.4.2 | Cached · Upstream SHA-256 matched | Download | 1259e2a4…20f4d5 |
| 0.4.3 | Cached · Upstream SHA-256 matched | Download | 7cbbc0de…c60fe2 |
Dependencies
analyzer "^6.7.0"
analyzer_plugin "^0.11.3"
custom_lint_builder "^0.7.0"