@@ -14,22 +14,253 @@ analyzer:
14
14
- " bricks/**"
15
15
- ' **/*.g.dart'
16
16
- ' **/*.freezed.dart'
17
+ - " lib/app/localization/**"
18
+
19
+ errors :
20
+ prefer_mixin : ignore
21
+ flutter_style_todos : ignore
22
+ invalid_annotation_target : ignore
23
+ always_use_package_imports : warning
24
+ avoid_dynamic_calls : info
25
+ avoid_empty_else : error
26
+ avoid_print : warning
27
+ avoid_relative_lib_imports : warning
28
+ avoid_returning_null_for_future : error
29
+ avoid_slow_async_io : warning
30
+ avoid_type_to_string : error
31
+ avoid_types_as_parameter_names : info
32
+ avoid_web_libraries_in_flutter : error
33
+ cancel_subscriptions : error
34
+ close_sinks : error
35
+ comment_references : info
36
+ control_flow_in_finally : error
37
+ empty_statements : error
38
+ hash_and_equals : error
39
+ iterable_contains_unrelated_type : error
40
+ list_remove_unrelated_type : error
41
+ literal_only_boolean_expressions : warning
42
+ no_adjacent_strings_in_list : error
43
+ no_duplicate_case_values : error
44
+ no_logic_in_create_state : error
45
+ prefer_void_to_null : error
46
+ test_types_in_equals : error
47
+ throw_in_finally : error
48
+ unnecessary_statements : error
49
+ unrelated_type_equality_checks : error
50
+ unsafe_html : error
51
+ use_build_context_synchronously : info
52
+ use_key_in_widget_constructors : info
53
+ valid_regexps : error
54
+ missing_required_param : error
55
+ missing_return : error
56
+ collection_methods_unrelated_type : warning
57
+ avoid_final_parameters : error
58
+ cast_nullable_to_non_nullable : warning
59
+ implicit_call_tearoffs : info
17
60
18
61
linter :
19
- # The lint rules applied to this project can be customized in the
20
- # section below to disable rules from the `package:flutter_lints/flutter.yaml`
21
- # included above or to enable additional rules. A list of all available lints
22
- # and their documentation is published at
23
- # https://dart-lang.github.io/linter/lints/index.html.
24
- #
25
- # Instead of disabling a lint rule for the entire project in the
26
- # section below, it can also be suppressed for a single line of code
27
- # or a specific dart file by using the `// ignore: name_of_lint` and
28
- # `// ignore_for_file: name_of_lint` syntax on the line or in the file
29
- # producing the lint.
30
62
rules :
31
- # avoid_print: false # Uncomment to disable the `avoid_print` rule
32
- # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
63
+ # Const rules.
64
+ prefer_const_constructors : true
65
+ prefer_const_constructors_in_immutables : true
66
+ prefer_const_declarations : true
67
+ prefer_const_literals_to_create_immutables : true
68
+ unnecessary_const : true
69
+ unnecessary_late : true
70
+
71
+ # Error rules.
72
+ always_use_package_imports : true
73
+ avoid_empty_else : true
74
+ avoid_print : true
75
+ avoid_relative_lib_imports : true
76
+ avoid_slow_async_io : true
77
+ avoid_type_to_string : true
78
+ avoid_types_as_parameter_names : true
79
+ avoid_web_libraries_in_flutter : true
80
+ cancel_subscriptions : true
81
+ close_sinks : true
82
+ control_flow_in_finally : true
83
+ empty_statements : true
84
+ hash_and_equals : true
85
+ collection_methods_unrelated_type : true
86
+ literal_only_boolean_expressions : true
87
+ no_adjacent_strings_in_list : true
88
+ no_duplicate_case_values : true
89
+ no_logic_in_create_state : true
90
+ prefer_void_to_null : true
91
+ test_types_in_equals : true
92
+ throw_in_finally : true
93
+ unnecessary_statements : true
94
+ unrelated_type_equality_checks : true
95
+ unsafe_html : true
96
+ use_build_context_synchronously : true
97
+ use_key_in_widget_constructors : true
98
+ valid_regexps : true
99
+ avoid_dynamic_calls : true
100
+ invalid_case_patterns : true
101
+
102
+ # Style rules.
103
+ always_declare_return_types : true
104
+ always_put_required_named_parameters_first : true
105
+ annotate_overrides : true
106
+ avoid_annotating_with_dynamic : true
107
+ avoid_bool_literals_in_conditional_expressions : true
108
+ avoid_catching_errors : true
109
+ avoid_equals_and_hash_code_on_mutable_classes : true
110
+ avoid_escaping_inner_quotes : true
111
+ avoid_field_initializers_in_const_classes : true
112
+ avoid_function_literals_in_foreach_calls : true
113
+ avoid_implementing_value_types : true
114
+ avoid_init_to_null : true
115
+ avoid_js_rounded_ints : true
116
+ avoid_multiple_declarations_per_line : true
117
+ avoid_null_checks_in_equality_operators : true
118
+ avoid_positional_boolean_parameters : true
119
+ avoid_private_typedef_functions : true
120
+ avoid_renaming_method_parameters : true
121
+ avoid_return_types_on_setters : true
122
+ avoid_returning_null_for_void : true
123
+ avoid_returning_this : true
124
+ avoid_setters_without_getters : true
125
+ avoid_shadowing_type_parameters : true
126
+ avoid_single_cascade_in_expression_statements : true
127
+ avoid_types_on_closure_parameters : true
128
+ avoid_unnecessary_containers : true
129
+ avoid_unused_constructor_parameters : true
130
+ avoid_void_async : true
131
+ await_only_futures : true
132
+ camel_case_extensions : true
133
+ camel_case_types : true
134
+ cascade_invocations : true
135
+ constant_identifier_names : true
136
+ curly_braces_in_flow_control_structures : true
137
+ deprecated_consistency : true
138
+ directives_ordering : true
139
+ do_not_use_environment : true
140
+ empty_catches : true
141
+ empty_constructor_bodies : true
142
+ exhaustive_cases : true
143
+ file_names : true
144
+ implementation_imports : true
145
+ leading_newlines_in_multiline_strings : true
146
+ library_names : true
147
+ library_prefixes : true
148
+ missing_whitespace_between_adjacent_strings : true
149
+ no_runtimeType_toString : true
150
+ non_constant_identifier_names : true
151
+ null_closures : true
152
+ omit_local_variable_types : true
153
+ one_member_abstracts : true
154
+ only_throw_errors : true
155
+ overridden_fields : true
156
+ package_api_docs : true
157
+ parameter_assignments : true
158
+ prefer_adjacent_string_concatenation : true
159
+ prefer_asserts_in_initializer_lists : true
160
+ prefer_collection_literals : true
161
+ prefer_conditional_assignment : true
162
+ prefer_constructors_over_static_methods : true
163
+ prefer_contains : true
164
+ prefer_final_fields : true
165
+ prefer_final_in_for_each : true
166
+ prefer_final_locals : true
167
+ prefer_for_elements_to_map_fromIterable : true
168
+ prefer_function_declarations_over_variables : true
169
+ prefer_generic_function_type_aliases : true
170
+ prefer_if_elements_to_conditional_expressions : true
171
+ prefer_if_null_operators : true
172
+ prefer_initializing_formals : true
173
+ prefer_inlined_adds : true
174
+ prefer_interpolation_to_compose_strings : true
175
+ prefer_is_empty : true
176
+ prefer_is_not_empty : true
177
+ prefer_is_not_operator : true
178
+ prefer_iterable_whereType : true
179
+ prefer_mixin : true
180
+ prefer_null_aware_operators : true
181
+ prefer_single_quotes : true
182
+ prefer_spread_collections : true
183
+ prefer_typing_uninitialized_variables : true
184
+ provide_deprecation_message : true
185
+ public_member_api_docs : false
186
+ recursive_getters : true
187
+ sized_box_for_whitespace : true
188
+ slash_for_doc_comments : true
189
+ sort_child_properties_last : true
190
+ sort_constructors_first : false
191
+ sort_unnamed_constructors_first : false
192
+ type_annotate_public_apis : true
193
+ type_init_formals : true
194
+ unawaited_futures : true
195
+ unnecessary_await_in_return : true
196
+ unnecessary_brace_in_string_interps : true
197
+ unnecessary_getters_setters : true
198
+ unnecessary_lambdas : true
199
+ unnecessary_new : true
200
+ unnecessary_null_aware_assignments : true
201
+ unnecessary_null_checks : true
202
+ unnecessary_null_in_if_null_operators : true
203
+ unnecessary_nullable_for_final_variable_declarations : true
204
+ unnecessary_overrides : true
205
+ unnecessary_parenthesis : true
206
+ unnecessary_raw_strings : true
207
+ unnecessary_string_escapes : true
208
+ unnecessary_string_interpolations : true
209
+ unnecessary_this : true
210
+ use_full_hex_values_for_flutter_colors : true
211
+ use_function_type_syntax_for_parameters : true
212
+ use_if_null_to_convert_nulls_to_bools : true
213
+ use_is_even_rather_than_modulo : true
214
+ use_late_for_private_fields_and_variables : true
215
+ use_named_constants : true
216
+ use_raw_strings : true
217
+ use_rethrow_when_possible : true
218
+ use_setters_to_change_properties : true
219
+ use_string_buffers : true
220
+ use_to_and_as_if_applicable : true
221
+ void_checks : true
222
+ lines_longer_than_80_chars : true
223
+ flutter_style_todos : true
224
+ conditional_uri_does_not_exist : true
225
+ no_leading_underscores_for_library_prefixes : true
226
+ no_leading_underscores_for_local_identifiers : true
227
+ secure_pubspec_urls : true
228
+ sized_box_shrink_expand : true
229
+ use_decorated_box : true
230
+ use_colored_box : true
231
+ avoid_double_and_int_checks : true
232
+ avoid_final_parameters : true
233
+ avoid_redundant_argument_values : true
234
+ cast_nullable_to_non_nullable : true
235
+ combinators_ordering : true
236
+ dangling_library_doc_comments : true
237
+ eol_at_end_of_file : true
238
+ implicit_call_tearoffs : true
239
+ join_return_with_assignment : true
240
+ library_private_types_in_public_api : true
241
+ no_default_cases : true
242
+ noop_primitive_operations : true
243
+ null_check_on_nullable_type_parameter : true
244
+ package_prefixed_library_names : true
245
+ prefer_asserts_with_message : true
246
+ prefer_int_literals : true
247
+ prefer_null_aware_method_calls : true
248
+ require_trailing_commas : true
249
+ tighten_type_of_initializing_formals : true
250
+ unnecessary_constructor_name : true
251
+ unnecessary_library_directive : true
252
+ unnecessary_to_list_in_spreads : true
253
+ use_enums : true
254
+ use_string_in_part_of_directives : true
255
+ use_super_parameters : true
256
+ use_test_throws_matchers : true
257
+ unnecessary_breaks : true
258
+
259
+ # Pub rules.
260
+ package_names : true
261
+ depend_on_referenced_packages : true
33
262
34
- # Additional information about this file can be found at
35
- # https://dart.dev/guides/language/analysis-options
263
+ # https://github.com/dart-lang/lints/blob/main/lib/core.yaml
264
+ # https://github.com/dart-lang/lints/blob/main/lib/recommended.yaml
265
+ # https://github.com/flutter/packages/blob/master/packages/flutter_lints/lib/flutter.yaml
266
+ # https://pub.dev/packages/dart_code_metrics
0 commit comments