Viewing version 0.1.0. Open the latest package page.

bloc_lint

0.1.0

Set of lint rules for the Flutter BLoC library.

Download archive

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

VersionPublishedArchiveSHA-256
0.1.0Cached · Upstream SHA-256 matchedDownloadfcf80877…34fc65
0.2.0-dev.0Cached · Upstream SHA-256 matchedDownload634c3b6e…f9a46e
0.2.0-dev.1Cached · Upstream SHA-256 matchedDownload4921ede3…1ebaf8
0.2.0-dev.2Cached · Upstream SHA-256 matchedDownloade4b48eb2…dcfd9b
0.2.0-dev.3Cached · Upstream SHA-256 matchedDownload03629e15…679c85
0.2.0-dev.4Cached · Upstream SHA-256 matchedDownloada3f44e77…fd9f22
0.2.0-dev.5Cached · Upstream SHA-256 matchedDownload40ae2585…9df805
0.2.0-dev.6Cached · Upstream SHA-256 matchedDownloadd6e5a3f4…1dec63
0.2.0Cached · Upstream SHA-256 matchedDownloadaf723805…147c36
0.2.1Cached · Upstream SHA-256 matchedDownload116bfd31…c64ae3
0.3.0Cached · Upstream SHA-256 matchedDownloadc93fcf61…1a636b
0.3.1Cached · Upstream SHA-256 matchedDownload9e0d71bb…81288f
0.3.2Cached · Upstream SHA-256 matchedDownloadc7f09846…1c19d4
0.3.3Cached · Upstream SHA-256 matchedDownload5c1325b3…fc0270
0.3.4Cached · Upstream SHA-256 matchedDownload0bfcb288…f94685
0.3.5Cached · Upstream SHA-256 matchedDownload4ba9c78d…5e0f38
0.3.6Cached · Upstream SHA-256 matchedDownload4218f1b2…bf5843
0.3.7Cached · Upstream SHA-256 matchedDownload48d141f6…44ccf4
0.4.0Cached · Upstream SHA-256 matchedDownloade40b5782…a46f79
0.4.1Cached · Upstream SHA-256 matchedDownload5bf965e3…4aba71
0.4.2Cached · Upstream SHA-256 matchedDownload1259e2a4…20f4d5
0.4.3Cached · Upstream SHA-256 matchedDownload7cbbc0de…c60fe2

Dependencies

analyzer "^6.7.0"

analyzer_plugin "^0.11.3"

custom_lint_builder "^0.7.0"