-
Notifications
You must be signed in to change notification settings - Fork 4
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(deriv_lint): update lint rules #587
base: master
Are you sure you want to change the base?
Conversation
- null_closures | ||
- omit_local_variable_types |
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.
i think this conflicts with always specify type?
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.
I dont think so , the omit_local_variable_types is just for local variable . but the always specify is for outside the scope vars
- always_put_required_named_parameters_first | ||
- always_require_non_null_named_parameters | ||
- always_specify_types |
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.
I think this is a great rule for code readability
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.
Details
#
NOTE: This rule is removed in Dart 3.3.0; it is no longer functional.
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.
The comment is about always_specify_types
@ahrar-deriv . Is there a reason to remove it?
- use_function_type_syntax_for_parameters | ||
- use_if_null_to_convert_nulls_to_bools |
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.
don't you think it is cleaner the other way around?
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.
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.
this is the base for our projects. if any rule does not make sense to the team they can
alter it like this
rules:
use_if_null_to_convert_nulls_to_bools: false
overall I think it is good that we are doing it in null-aware fashion
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.
Thanks for the link. I know it is effective dart, but do you think it is cleaner to assign a value instead of == true/false?
Their rules can change from bad to good overnight, it is up to us to decide what is best :D
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.
yes all are subjective. we can vote on it :) all the rules are here for debate
Clickup link: https://app.clickup.com/t/20696747/DERG-2271
This PR contains the following changes:
Developers Note (Optional)
Pre-launch Checklist (For PR creator)
As a creator of this PR:
Reviewers
@sahani-deriv @ramin-deriv @abedelaziz-deriv
Pre-launch Checklist (For Reviewers)
As a reviewer I ensure that:
Pre-launch Checklist (For QA)
Pre-launch Checklist (For Maintainer)