-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(bloc_lint): move bloc_lint package from vmichalak repository to bloc monorepo #4278
base: master
Are you sure you want to change the base?
Conversation
…bloc monorepo Implements: felangel#4264
@vmichalak thanks so much for the quick turnaround! I’ll take a closer look asap (I’m traveling right now). Can you also add me as a publisher to the pub package when you have a chance? Thanks! |
@felangel i've add you to my publisher :) |
I didn’t get the invite. Are you sure you added the right email? Mine is [email protected] |
Awesome just got it and moved the package under the bloclibrary publisher. I’ll try to review and get this PR merged later today (once I’m done traveling). Thanks so much for all the contributions! Looking forward to shipping an improved v0.2.0 in the near future 💙🎉 |
@felangel enjoy your traveling and we gonna talk about how to upgrade it for the 0.2.0 :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we maybe add a short description to each of the rules? I feel like lint rules are more valuable if they tell you why things are a good/bad idea. The official dart.dev
lint rules do this, for example:
Something like:
avoid_public_method_on_bloc
Blocs are intended to be interacted with by adding events via the.add()
method only. By exposing public methods it may be tempting to treat the bloc as if it were a cubit.
avoid_public_properties_on_bloc_and_cubit
Exposing public properties can lead to anti-patterns such as having public state that is not part of thestate
property or using repositories and services exposed by the bloc in the widget tree that should be accessed via other means such asRepositoryProvider.of()
orcontext.read<T>()
prefer_multi_bloc_listener
MultiBlocListener
s reduce nesting, make it easier to see what blocs are provided at the current widget tree level and can make refactoring easier.
If you have any solution to add rules directly to the "dart analyzer" it could be awesome. But for the moment i have no idea of how to make this (that's why i've used custom_lint to make the first version). |
@felangel For your info, i've add a |
40b76b5
to
87ccd4c
Compare
@vmichalak I created #4281 to just create an empty scaffold so that we can discuss what specific lint rules we want to include rather than moving everything and then deleting/renaming. I figured it'd be easier and cleaner if we discuss and port over agreed upon changes instead. Hope that works for you, thanks again and sorry for the delay! |
Since the first version is a proof of concept, seems ok to me let's work like that |
Status
READY
Breaking Changes
NO
Description
Move the bloc_lint from my personal repository to the bloc monorepo to simplify management of the package.
Implements: #4264
Type of Change