You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

86 lines
2.5 KiB

include: package:flutter_lints/flutter.yaml
analyzer:
exclude:
- build/**
- lib/*.g.dart
- lib/*.freezed.dart
- lib/**/*.g.dart
- lib/**/*.freezed.dart
- lib/**/*.gr.dart
- lib/generated_plugin_registrant.dart
- shared_components/**/*.*
linter:
rules:
# STYLE
- camel_case_types
- camel_case_extensions
- library_names
- file_names
- library_prefixes
- non_constant_identifier_names
- constant_identifier_names
- directives_ordering
- lines_longer_than_80_chars
- curly_braces_in_flow_control_structures
- sort_pub_dependencies
- prefer_single_quotes
- always_declare_return_types
# DOCUMENTATION
- slash_for_doc_comments
- package_api_docs
# - public_member_api_docs
#- comment_references # Unused because https://github.com/dart-lang/sdk/issues/36974
# USAGE
- implementation_imports
- avoid_relative_lib_imports
- prefer_relative_imports
- prefer_adjacent_string_concatenation
- prefer_interpolation_to_compose_strings
- unnecessary_brace_in_string_interps
- prefer_collection_literals
- prefer_is_empty
- prefer_is_not_empty
- avoid_function_literals_in_foreach_calls
- prefer_iterable_whereType
- prefer_function_declarations_over_variables
- unnecessary_lambdas
- prefer_equal_for_default_values
- avoid_init_to_null
- unnecessary_getters_setters
#- unnecessary_getters # prefer # Disabled pending fix: https://github.com/dart-lang/linter/issues/23
- unnecessary_this
- prefer_initializing_formals
- type_init_formals
- empty_constructor_bodies
- unnecessary_new
- unnecessary_const
- avoid_catches_without_on_clauses
- avoid_catching_errors
- use_rethrow_when_possible
# DESIGN
- use_to_and_as_if_applicable
- one_member_abstracts
- avoid_classes_with_only_static_members
- prefer_mixin
- prefer_final_fields
- use_setters_to_change_properties
- avoid_setters_without_getters
- avoid_returning_null
- avoid_returning_this
- type_annotate_public_apis
- prefer_typing_uninitialized_variables
- omit_local_variable_types
- avoid_types_on_closure_parameters
- avoid_return_types_on_setters
- prefer_generic_function_type_aliases
- avoid_private_typedef_functions
- use_function_type_syntax_for_parameters
- avoid_positional_boolean_parameters
- hash_and_equals
- avoid_equals_and_hash_code_on_mutable_classes
- avoid_null_checks_in_equality_operators