Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vmichalak/bloc_lint
Linter for BLoC library
https://github.com/vmichalak/bloc_lint
Last synced: 2 months ago
JSON representation
Linter for BLoC library
- Host: GitHub
- URL: https://github.com/vmichalak/bloc_lint
- Owner: vmichalak
- License: mit
- Created: 2024-11-05T14:45:25.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-11-09T23:13:46.000Z (3 months ago)
- Last Synced: 2024-11-09T23:21:52.641Z (3 months ago)
- Language: Dart
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Bloc Lint
===# ⚠️ IMPORTANT NOTICE:
This package have moved to [bloc monorepo](https://github.com/felangel/bloc/pull/4278) and will be maintained there.Please refer to the Bloc monorepo for the latest updates.
---
Custom linter rules for Flutter projects using the [bloc library](https://bloclibrary.dev/). This package is based on
[dart_custom_lint](https://github.com/invertase/dart_custom_lint) package.## Usage
Add the following to your `pubspec.yaml` file:
```yaml
dev_dependencies:
custom_lint: ^0.7.0
bloc_lint: ^0.1.0
```Add the following to your `analysis_options.yaml` file:
```yaml
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
- [avoid_public_methods_on_bloc](doc/rules/avoid_public_methods_on_bloc.md)
- [avoid_public_properties_on_bloc_and_cubit](doc/rules/avoid_public_properties_on_bloc_and_cubit.md)
- [event_base_class_suffix](doc/rules/event_base_class_suffix.md)
- [prefer_multi_bloc_listener](doc/rules/prefer_multi_bloc_listener.md)
- [prefer_multi_bloc_provider](doc/rules/prefer_multi_bloc_provider.md)
- [prefer_multi_repository_provider](doc/rules/prefer_multi_repository_provider.md)
- [state_base_class_suffix](doc/rules/state_base_class_suffix.md)