|
1 | 1 | ---
|
| 2 | +include: package:flutter_lints/flutter.yaml |
| 3 | + |
2 | 4 | analyzer:
|
3 | 5 | errors:
|
4 |
| - missing_required_param: error |
| 6 | + # Allow State classes of StatefulWidgets to be private. |
| 7 | + library_private_types_in_public_api: ignore |
| 8 | + |
| 9 | + # Desirable, but experimental. |
| 10 | + use_build_context_synchronously: ignore |
5 | 11 |
|
6 | 12 | linter:
|
7 | 13 | rules:
|
8 |
| - - always_declare_return_types |
9 |
| - - always_put_control_body_on_new_line |
10 |
| - - always_put_required_named_parameters_first |
11 |
| - - always_require_non_null_named_parameters |
12 |
| - # May review this on in future for the sake of readability |
13 |
| - # - always_specify_types |
14 |
| - - always_use_package_imports |
15 |
| - - annotate_overrides |
16 |
| - - avoid_annotating_with_dynamic |
17 |
| - # May review this on in future if not possible to infer all types |
18 |
| - # - avoid_as |
19 |
| - - avoid_bool_literals_in_conditional_expressions |
20 |
| - - avoid_catches_without_on_clauses |
21 |
| - - avoid_catching_errors |
22 |
| - - avoid_classes_with_only_static_members |
23 |
| - - avoid_double_and_int_checks |
24 |
| - - avoid_empty_else |
25 |
| - - avoid_equals_and_hash_code_on_mutable_classes |
26 |
| - - avoid_escaping_inner_quotes |
27 |
| - - avoid_field_initializers_in_const_classes |
28 |
| - - avoid_function_literals_in_foreach_calls |
29 |
| - - avoid_implementing_value_types |
30 |
| - - avoid_init_to_null |
31 |
| - - avoid_js_rounded_ints |
32 |
| - - avoid_null_checks_in_equality_operators |
33 |
| - - avoid_positional_boolean_parameters |
34 |
| - # Don't want to include logger as dependency |
35 |
| - # - avoid_print |
36 |
| - - avoid_private_typedef_functions |
37 |
| - - avoid_redundant_argument_values |
38 |
| - - avoid_relative_lib_imports |
39 |
| - - avoid_renaming_method_parameters |
40 |
| - - avoid_return_types_on_setters |
41 |
| - - avoid_returning_null |
42 |
| - - avoid_returning_null_for_future |
43 |
| - - avoid_returning_null_for_void |
44 |
| - - avoid_returning_this |
45 |
| - - avoid_setters_without_getters |
46 |
| - - avoid_shadowing_type_parameters |
47 |
| - - avoid_single_cascade_in_expression_statements |
48 |
| - - avoid_slow_async_io |
49 |
| - - avoid_type_to_string |
50 |
| - - avoid_types_as_parameter_names |
51 |
| - - avoid_types_on_closure_parameters |
52 |
| - - avoid_unnecessary_containers |
53 |
| - - avoid_unused_constructor_parameters |
54 |
| - - avoid_void_async |
55 |
| - - avoid_web_libraries_in_flutter |
56 |
| - - await_only_futures |
57 |
| - - camel_case_extensions |
58 |
| - - camel_case_types |
59 |
| - - cancel_subscriptions |
60 |
| - - cascade_invocations |
61 |
| - # Experimental lint rule (null-safety) |
62 |
| - # - cast_nullable_to_non_nullable |
63 |
| - - close_sinks |
64 |
| - - comment_references |
65 |
| - - constant_identifier_names |
66 |
| - - control_flow_in_finally |
67 |
| - - curly_braces_in_flow_control_structures |
68 |
| - # Overkill for the implementation for the diagnostics |
69 |
| - # - diagnostic_describe_all_properties |
70 | 14 | - directives_ordering
|
71 |
| - - do_not_use_environment |
72 |
| - - empty_catches |
73 |
| - - empty_constructor_bodies |
74 |
| - - empty_statements |
75 |
| - - exhaustive_cases |
76 |
| - - file_names |
77 |
| - # It forces an assignee to each TODO |
78 |
| - # - flutter_style_todos |
79 |
| - - hash_and_equals |
80 |
| - - implementation_imports |
81 |
| - - invariant_booleans |
82 |
| - - iterable_contains_unrelated_type |
83 |
| - - join_return_with_assignment |
84 |
| - - leading_newlines_in_multiline_strings |
85 |
| - - library_names |
86 |
| - - library_prefixes |
87 |
| - - lines_longer_than_80_chars |
88 |
| - - list_remove_unrelated_type |
89 |
| - - literal_only_boolean_expressions |
90 |
| - - missing_whitespace_between_adjacent_strings |
91 |
| - - no_adjacent_strings_in_list |
92 |
| - # Experimental lint rule |
93 |
| - # - no_default_cases |
94 |
| - - no_duplicate_case_values |
95 |
| - - no_logic_in_create_state |
96 |
| - - no_runtimeType_toString |
97 |
| - - non_constant_identifier_names |
98 |
| - # Experimental lint rule (null-safety) |
99 |
| - # - null_check_on_nullable_type_parameter |
100 |
| - - null_closures |
101 |
| - # May review this on in future for the sake of readability |
102 |
| - - omit_local_variable_types |
103 |
| - # Don't see the value in this one |
104 |
| - # - one_member_abstracts |
105 |
| - - only_throw_errors |
106 |
| - - overridden_fields |
107 |
| - - package_api_docs |
108 |
| - - package_names |
109 |
| - - package_prefixed_library_names |
110 |
| - - parameter_assignments |
111 |
| - - prefer_adjacent_string_concatenation |
112 |
| - - prefer_asserts_in_initializer_lists |
113 |
| - # Overkill |
114 |
| - # - prefer_asserts_with_message |
115 |
| - - prefer_collection_literals |
116 |
| - - prefer_conditional_assignment |
117 |
| - - prefer_const_constructors |
118 |
| - - prefer_const_constructors_in_immutables |
119 |
| - - prefer_const_declarations |
120 |
| - - prefer_const_literals_to_create_immutables |
121 |
| - - prefer_constructors_over_static_methods |
122 |
| - - prefer_contains |
123 |
| - # General Flutter practice is single quotes |
124 |
| - # - prefer_double_quotes |
125 |
| - - prefer_equal_for_default_values |
126 |
| - - prefer_expression_function_bodies |
127 |
| - - prefer_final_fields |
128 |
| - - prefer_final_in_for_each |
129 |
| - - prefer_final_locals |
130 |
| - - prefer_for_elements_to_map_fromIterable |
131 |
| - - prefer_foreach |
132 |
| - - prefer_function_declarations_over_variables |
133 |
| - - prefer_generic_function_type_aliases |
134 |
| - - prefer_if_elements_to_conditional_expressions |
135 |
| - - prefer_if_null_operators |
136 |
| - - prefer_initializing_formals |
137 |
| - - prefer_inlined_adds |
138 |
| - - prefer_int_literals |
139 |
| - - prefer_interpolation_to_compose_strings |
140 |
| - - prefer_is_empty |
141 |
| - - prefer_is_not_empty |
142 |
| - - prefer_is_not_operator |
143 |
| - - prefer_iterable_whereType |
144 |
| - - prefer_mixin |
145 |
| - - prefer_null_aware_operators |
146 |
| - # Prefer fully qualified package imports |
147 |
| - # - prefer_relative_imports |
148 |
| - - prefer_single_quotes |
149 |
| - - prefer_spread_collections |
150 |
| - - prefer_typing_uninitialized_variables |
151 |
| - - prefer_void_to_null |
152 |
| - - provide_deprecation_message |
153 |
| - # Not every class has a reason to have comprehensive documentation |
154 |
| - # - public_member_api_docs |
155 |
| - - recursive_getters |
156 |
| - - sized_box_for_whitespace |
157 |
| - - slash_for_doc_comments |
158 |
| - - sort_child_properties_last |
159 |
| - - sort_constructors_first |
160 |
| - - sort_pub_dependencies |
161 |
| - - sort_unnamed_constructors_first |
162 |
| - - test_types_in_equals |
163 |
| - - throw_in_finally |
164 |
| - - tighten_type_of_initializing_formals |
165 |
| - - type_annotate_public_apis |
166 |
| - - type_init_formals |
167 |
| - - unawaited_futures |
168 |
| - - unnecessary_await_in_return |
169 |
| - - unnecessary_brace_in_string_interps |
170 |
| - - unnecessary_const |
171 |
| - # With this linter, it is advised to use var, instead of final but it can break the immutability approach |
172 |
| - # - unnecessary_final |
173 |
| - - unnecessary_getters_setters |
174 |
| - - unnecessary_lambdas |
175 |
| - - unnecessary_new |
176 |
| - - unnecessary_null_aware_assignments |
177 |
| - # Experimental lint rule (null-safety) |
178 |
| - # - unnecessary_null_checks |
179 |
| - - unnecessary_null_in_if_null_operators |
180 |
| - # Experimental lint rule (null-safety) |
181 |
| - # - unnecessary_nullable_for_final_variable_declarations |
182 |
| - - unnecessary_overrides |
183 |
| - - unnecessary_parenthesis |
184 |
| - - unnecessary_raw_strings |
185 |
| - - unnecessary_statements |
186 |
| - - unnecessary_string_escapes |
187 |
| - - unnecessary_string_interpolations |
188 |
| - - unnecessary_this |
189 |
| - - unrelated_type_equality_checks |
190 |
| - - unsafe_html |
191 |
| - - use_full_hex_values_for_flutter_colors |
192 |
| - - use_function_type_syntax_for_parameters |
193 |
| - - use_is_even_rather_than_modulo |
194 |
| - - use_key_in_widget_constructors |
195 |
| - # Experimental lint rule (null-safety) |
196 |
| - # - use_late_for_private_fields_and_variables |
197 |
| - - use_raw_strings |
198 |
| - - use_rethrow_when_possible |
199 |
| - - use_setters_to_change_properties |
200 |
| - - use_string_buffers |
201 |
| - - use_to_and_as_if_applicable |
202 |
| - - valid_regexps |
203 |
| - - void_checks |
| 15 | + - flutter_style_todos |
0 commit comments