many_lints 0.3.0
many_lints: ^0.3.0 copied to clipboard
A useful collection of custom lints for Flutter & Dart projects
Changelog #
0.3.0 - 2026-02-14 #
Added #
prefer_shorthands_with_enumsrule to detect enum values replaceable with shorthand constructorsprefer_shorthands_with_constructorsrule to detect constructors replaceable with shorthand syntaxprefer_shorthands_with_static_fieldsrule to detect static fields replaceable with shorthand syntaxprefer_returning_shorthandsrule to detect return statements replaceable with shorthand syntaxprefer_switch_expressionrule to suggest using switch expressions over switch statementsprefer_explicit_function_typerule to prefer explicit function types overFunctionprefer_type_over_varrule to prefer explicit type annotations overvarprefer_abstract_final_static_classrule to flag utility classes that should be abstract finalprefer_iterable_ofrule to preferIterable.ofoverIterable.fromfor same-type conversionsavoid_accessing_collections_by_constant_indexrule to flag hardcoded index access on collectionsavoid_cascade_after_if_nullrule to detect cascades after if-null operatorsavoid_collection_equality_checksrule to flag equality checks on collectionsavoid_collection_methods_with_unrelated_typesrule to flag collection method calls with unrelated typesavoid_commented_out_coderule to detect commented-out code blocks
Changed #
- Extracted shared utilities, renamed helpers, and refactored suffix rules
0.2.1 - 2026-02-05 #
0.2.0 - 2026-02-05 #
Added #
use_gaprule to preferGapwidget overSizedBoxorPaddingfor spacing- Quick fixes for suffix rules (
use_bloc_suffix,use_cubit_suffix,use_notifier_suffix) - Quick fix for
avoid_unnecessary_consumer_widgetsrule - Example project demonstrating all lint rules
- Dartdoc comments to public APIs
Changed #
- Renamed test methods to snake_case for consistency
- Applied recommended lints from
lintspackage
0.1.2 - 2026-02-04 #
Fixed #
- Add
lib/main.dartre-export for properanalysis_server_plugindiscovery - Replace deprecated analyzer API usages with new equivalents
0.1.0 - 2026-02-04 #
Added #
avoid_single_child_in_multi_child_widgets- detect single-child usage in multi-child widgetsavoid_unnecessary_consumer_widgets- flag unnecessary Riverpod consumer widgetsavoid_unnecessary_hook_widgets- flag unnecessary hook widgets with quick fixprefer_align_over_container- preferAlignoverContainerfor alignment onlyprefer_any_or_every- preferany/everyover manual iteration with quick fixprefer_center_over_align- preferCenteroverAlignfor centering with quick fixprefer_padding_over_container- preferPaddingoverContainerfor padding only with quick fixuse_bloc_suffix- enforceBlocsuffix on bloc classesuse_cubit_suffix- enforceCubitsuffix on cubit classesuse_dedicated_media_query_methods- prefer dedicatedMediaQuerymethods with quick fixuse_notifier_suffix- enforceNotifiersuffix on notifier classesconvert_iterable_map_to_collection_forassist