monstarlab_lints 1.0.4 monstarlab_lints: ^1.0.4 copied to clipboard
Flutter lint rules used in Monstarlab EMEA.
Changelog #
1.0.4 #
Add new linter rules:
- non_constant_identifier_names — helps to maintain naming conventions.
1.0.3 #
Add new linter rules:
-
always_put_control_body_on_new_line — Along with curly_braces_in_flow_control_structures will help us to create flow breakers more organically (e.g. avoid having
if (..) return;
) -
avoid_slow_async_io — Instead of using certain async IO function, dart suggests to use their sync alternatives
-
directives_ordering — Sort imports
-
matching_super_parameters — If you inherit from a class, make sure the constructor params sequence match the parent's params
-
no_self_assignments — Avoid having
a = a;
-
prefer_asserts_in_initializer_lists — Put asserts on the initializer level, not in to the constructor body
-
unnecessary_await_in_return — No need to await before returning
-
unnecessary_breaks — No need for a break unless you want to end execution earlier.
-
unnecessary_lambdas — If a method's parameters match the parameters of a required callback, don't create a lambda but pass the method directly as a tear-off.
-
unnecessary_library_directive — If
library
directive doesn't provide a name, it's not needed -
unnecessary_null_aware_operator_on_extension_on_nullable — If an extension is declared on a nullable type, no need to do the check
-
unnecessary_null_checks — Removes null checks, e.g. if a function accepts a nullable variable there's no reason to pass it as
v!
-
unnecessary_parenthesis — Removes brackets
-
unnecessary_statements — Avoids having statements that return a result but aren't used.
-
unreachable_from_main — Any member declared in an executable library should be used directly inside that library.
1.0.2 #
- Add platforms information to pub.dev
1.0.1 #
- Typo fix.
1.0.0 #
- Initial release.