Skip to content

feat(bloc_lint): add prefer_bloc_provider - #4860

Open
AzazelSensei wants to merge 1 commit into
felangel:masterfrom
AzazelSensei:feat/prefer-bloc-provider
Open

feat(bloc_lint): add prefer_bloc_provider#4860
AzazelSensei wants to merge 1 commit into
felangel:masterfrom
AzazelSensei:feat/prefer-bloc-provider

Conversation

@AzazelSensei

Copy link
Copy Markdown

Status

READY

Breaking Changes

NO

Description

Adds a prefer_bloc_provider lint that warns when Provider<T> is used and T looks like a Bloc, Cubit, or BlocBase.

bloc_lint doesn't have type resolution, so this uses the same name heuristic as the other rules.

Closes #4464

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Code refactor
  • Build configuration change
  • Documentation
  • Chore

Warn when Provider<T> is used and T looks like a Bloc or Cubit
so BlocProvider is preferred instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(bloc_lint): prefer_bloc_provider

1 participant