Created
June 4, 2025 18:35
-
-
Save rkpontes/c6d133911d99a6f3f0a1555000a4cbfc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include: package:flutter_lints/flutter.yaml | |
linter: | |
rules: | |
# Imports | |
prefer_relative_imports: true | |
directives_ordering: true | |
# Estilo | |
prefer_single_quotes: true | |
require_trailing_commas: true | |
always_declare_return_types: true | |
annotate_overrides: true | |
avoid_empty_else: true | |
# Boas práticas | |
avoid_print: true | |
avoid_redundant_argument_values: true | |
avoid_relative_lib_imports: true | |
avoid_returning_null_for_future: true | |
avoid_slow_async_io: true | |
avoid_type_to_string: true | |
cancel_subscriptions: true | |
close_sinks: true | |
# Null Safety | |
avoid_returning_null: true | |
avoid_returning_null_for_void: true | |
null_check_on_nullable_type_parameter: true | |
# Collections | |
prefer_collection_literals: true | |
prefer_is_empty: true | |
prefer_is_not_empty: true | |
# Classes e Construtores | |
prefer_constructors_over_static_methods: true | |
prefer_final_fields: true | |
prefer_final_locals: true | |
unnecessary_const: true | |
use_key_in_widget_constructors: true | |
# Formatação | |
curly_braces_in_flow_control_structures: true | |
prefer_interpolation_to_compose_strings: true | |
unnecessary_brace_in_string_interps: true | |
# Performance | |
avoid_unnecessary_containers: true | |
use_build_context_synchronously: true | |
analyzer: | |
errors: | |
invalid_annotation_target: ignore # Útil quando usando packages como json_serializable | |
exclude: | |
- "**/*.g.dart" | |
- "**/*.freezed.dart" | |
# Additional information about this file can be found at | |
# https://dart.dev/guides/language/analysis-options |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment