pub repository
mirror.p-hatan.combloc_lint
0.4.3Official lint rules for development when using the bloc state management library.
Readme
Official lint rules for development when using the bloc state management library.
Learn more at bloclibrary.dev!
This package is built to work with:
Sponsors
Our top sponsors are shown below! [Become a Sponsor]
Quick Start
-
Install the bloc command-line tools
dart pub global activate bloc_tools -
Install the bloc_lint package
dart pub add --dev bloc_lint -
Add an
analysis_options.yamlto the root of your project with the recommended rulesinclude: package:bloc_lint/recommended.yaml -
Run the linter
bloc lint .
For more information, check out the official documentation
Recommended Lint Rules
- avoid_flutter_imports
- avoid_public_bloc_methods
- avoid_public_fields
- prefer_file_naming_conventions
- prefer_void_public_cubit_methods
All Lint Rules
- avoid_build_context_extensions
- avoid_flutter_imports
- avoid_public_bloc_methods
- avoid_public_fields
- prefer_bloc
- prefer_build_context_extensions
- prefer_cubit
- prefer_file_naming_conventions
- prefer_void_public_cubit_methods
Dart Versions
- Dart 3: >= 3.7.0
Maintainers
Changelog
0.4.3
- deps: adjust bounds for
_fe_analyzer_shared
0.4.2
- deps: adjust bounds for
_fe_analyzer_shared
0.4.1
- deps: adjust upper bound for
_fe_analyzer_shared
0.4.0
- feat: upgrade to latest analyzer frontend
0.3.7
- fix:
analysis_options.yamlresolution in pub workspace - deps: support latest stable Flutter version.
0.3.6
- feat: upgrade to latest analyzer frontend
0.3.5
- fix: adjust upper bound for
_fe_analyzer_shared
0.3.4
- chore: various dependency upgrades
0.3.3
- fix: ignore whitespace in ignore comments
- docs: add
bloc_lintbadge toREADME
0.3.2
- feat: add prefer_build_context_extensions
0.3.1
- fix: adjust lower bound for
_fe_analyzer_shared
0.3.0
- fix: widen supported version ranges for
_fe_analyzer_shared - feat: add avoid_build_context_extensions
- feat: add prefer_file_naming_conventions
0.2.1
- feat: ignore dot directories
- fix: include bloc/cubit instances defined in any file
- chore: various dependency upgrades
0.2.0
- chore: stable
0.2.0release ๐ - chore: various dependency upgrades
- fix: ignore
.fvm
0.2.0-dev.6
- fix:
prefer_void_public_cubit_methodsfalse positive when using switch expressions - fix:
avoid_public_bloc_methodsfalse positive when using switch expressions
0.2.0-dev.5
- fix:
avoid_public_bloc_methodsfalse positive when using switch expressions
0.2.0-dev.4
- fix: various bug fixes for Windows
0.2.0-dev.3
- feat: add support for
// ignore - feat: add support for
// ignore_for_file
0.2.0-dev.2
- feat: add prefer_void_public_cubit_methods
0.2.0-dev.1
- fix: package resolution in
includeon windows - fix: uri resolution on windows
- docs: improvements to
README.md
0.2.0-dev.0
- Full rewrite of
pkg:bloc_lint - Supported Lint Rules
0.1.0
- Initial experimental community release using
pkg:custom_lint
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add bloc_lintpubspec.yaml
name: bloc_lint
description: Official lint rules for development when using the bloc state management library.
version: 0.4.3
repository: https://github.com/felangel/bloc/tree/master/packages/bloc_lint
issue_tracker: https://github.com/felangel/bloc/issues
homepage: https://github.com/felangel/bloc
documentation: https://bloclibrary.dev
topics: [bloc, state-management, lint]
funding: [https://github.com/sponsors/felangel]
environment:
sdk: ">=3.7.0 <4.0.0"
dependencies:
_fe_analyzer_shared: ">=100.0.0 <=108.0.0"
checked_yaml: ^2.0.0
collection: ^1.0.0
glob: ^2.0.0
json_annotation: ^4.9.0
path: ^1.0.0
pubspec_lock_parse: ^2.0.0
dev_dependencies:
build_runner: ^2.0.0
json_serializable: ^6.0.0
meta: ^1.0.0
mocktail: ^1.0.0
test: ^1.0.0
screenshots:
- description: The bloc_lint package logo.
path: screenshots/logo.png
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.1.0 | 2024-11-10T15:53:55.553997Z | Download | fcf80877faf222089436696681375bc3bc9ca023305b69180ea81b449134fc65 |
| 0.2.0-dev.0 | 2025-04-25T01:55:21.196831Z | Download | 634c3b6e6932f80d2d77bca7c17f2953906448b379c10d30c938282559f9a46e |
| 0.2.0-dev.1 | 2025-05-01T04:28:49.362886Z | Download | 4921ede3985f52cb4534f92dcdeb61223f6551f278a992689b48f177e01ebaf8 |
| 0.2.0-dev.2 | 2025-05-03T03:41:50.889350Z | Download | e4b48eb2e94573d07d09fbed9c448744b7e7bb0195957a77556ceb0266dcfd9b |
| 0.2.0-dev.3 | 2025-05-12T04:46:27.916394Z | Download | 03629e15bab2b9fed80c6258f6e360908f809b9183b66e271d0f9dfdcd679c85 |
| 0.2.0-dev.4 | 2025-05-29T04:20:27.202943Z | Download | a3f44e77cf976f70d767b73f92768433d7429da2b4fd9e08a53eec5a69fd9f22 |
| 0.2.0-dev.5 | 2025-06-05T03:56:07.873075Z | Download | 40ae2585fba504eb15a0072d15ef17db8890202efb51c5663a243398c79df805 |
| 0.2.0-dev.6 | 2025-06-06T01:35:48.868297Z | Download | d6e5a3f40a6d56bf482a0d5897f22a0ad882419ff8ccfebf95385cc8c91dec63 |
| 0.2.0 | 2025-06-29T21:30:48.136605Z | Download | af7238054d0fb3bf56627285ff92076d1381dd321784f52fef2f1b15d4147c36 |
| 0.2.1 | 2025-07-20T03:13:25.584612Z | Download | 116bfd31fd1fa050212a7cd48fbf148661107edebab2f93264fb8ae213c64ae3 |
| 0.3.0 | 2025-08-19T04:11:35.494583Z | Download | c93fcf61da29c709b97e9764ab59c130a25b12c23608a60e3788b28bbc1a636b |
| 0.3.1 | 2025-08-19T04:15:36.679302Z | Download | 9e0d71bb531a129b51f38aa3313ee1c2ca3881cdca27b3c087c291b64d81288f |
| 0.3.2 | 2025-09-22T01:48:41.085805Z | Download | c7f0984689bccf5e8e08f1fd4054687547a558294b692c145211165eff1c19d4 |
| 0.3.3 | 2025-10-25T22:45:08.253811Z | Download | 5c1325b35bc4786ffd9eeba33d2015b72eb92fd30b36ebcd7732e55ad6fc0270 |
| 0.3.4 | 2025-11-20T20:01:55.737464Z | Download | 0bfcb2885c9faf2fb18b471ec34ed9efa2949799ecbcd2e9c5204f5b7cf94685 |
| 0.3.5 | 2025-11-21T14:11:07.542704Z | Download | 4ba9c78d73f97c5175eb2c419f94e6d8211edd06ace1783ea32dc64f865e0f38 |
| 0.3.6 | 2025-12-15T17:26:10.686037Z | Download | 4218f1b262066913f35941026efe824614df2e8d794f65ccde8f2e0f31bf5843 |
| 0.3.7 | 2026-02-09T20:52:39.142276Z | Download | 48d141f67552cc83703d5735f27ae9c549e4705b543e053eab77fa6cfa44ccf4 |
| 0.4.0 | 2026-02-09T21:36:53.817050Z | Download | e40b578297488e5a263cbfa2180b186546f32da40ae8a57cad6aa68be5a46f79 |
| 0.4.1 | 2026-04-12T17:59:28.905063Z | Download | 5bf965e3be5346fd6133e7f2eb4c845de3f2ae09eeae4d6622f400848b4aba71 |
| 0.4.2 | 2026-07-04T23:45:07.080018Z | Download | 1259e2a4c44afaa5cb69115a4773be4868751735ecdfe65c146f07ff9120f4d5 |
| 0.4.3 | 2026-09-23T17:56:54.591419Z | Download | 7cbbc0de0ee041d1efcb522148b9add1b660e55a4d60242a023de0ffd2c60fe2 |
Dependencies
_fe_analyzer_shared "\u003e=100.0.0 \u003c=108.0.0"
checked_yaml "^2.0.0"
collection "^1.0.0"
glob "^2.0.0"
json_annotation "^4.9.0"
path "^1.0.0"
pubspec_lock_parse "^2.0.0"