You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# - always_put_required_named_parameters_first # we prefer having parameters in the same order as fields https://github.com/flutter/flutter/issues/10219
34
-
# - always_specify_types # removed for redundancy: https://github.com/dart-lang/linter/issues/1848
36
+
# - always_specify_types # removed for redundancy: https://github.com/dart-lang/linter/issues/1848
35
37
# - always_use_package_imports # we do this commonly
36
38
- annotate_overrides
37
39
# - avoid_annotating_with_dynamic # conflicts with always_specify_types
38
40
- avoid_bool_literals_in_conditional_expressions
39
41
# - avoid_catches_without_on_clauses # blocked on https://github.com/dart-lang/linter/issues/3023
40
42
# - avoid_catching_errors # blocked on https://github.com/dart-lang/linter/issues/3023
41
-
# - avoid_classes_with_only_static_members: false # False positive for custom enum-like classes (such as Flutter's "Colors")
43
+
# - avoid_classes_with_only_static_members # we do this commonly for `abstract final class`es
42
44
- avoid_double_and_int_checks
43
45
- avoid_dynamic_calls
44
46
- avoid_empty_else
@@ -47,11 +49,10 @@ linter:
47
49
- avoid_field_initializers_in_const_classes
48
50
# - avoid_final_parameters # incompatible with prefer_final_parameters
49
51
- avoid_function_literals_in_foreach_calls
50
-
- avoid_implementing_value_types
52
+
#- avoid_implementing_value_types # see https://github.com/dart-lang/linter/issues/4558
51
53
- avoid_init_to_null
52
54
- avoid_js_rounded_ints
53
55
# - avoid_multiple_declarations_per_line # seems to be a stylistic choice we don't subscribe to
54
-
- avoid_null_checks_in_equality_operators
55
56
# - avoid_positional_boolean_parameters # would have been nice to enable this but by now there's too many places that break it
56
57
- avoid_print
57
58
# - avoid_private_typedef_functions # we prefer having typedef (discussion in https://github.com/flutter/flutter/pull/16356)
@@ -79,17 +80,20 @@ linter:
79
80
# - cascade_invocations # doesn't match the typical style of this repo
80
81
- cast_nullable_to_non_nullable
81
82
# - close_sinks # not reliable enough
82
-
# - combinators_ordering # DIFFERENT FROM FLUTTER/FLUTTER: This isn't available on stable yet.
83
+
- collection_methods_unrelated_type
84
+
- combinators_ordering
83
85
# - comment_references # blocked on https://github.com/dart-lang/linter/issues/1142
84
86
- conditional_uri_does_not_exist
85
87
# - constant_identifier_names # needs an opt-out https://github.com/dart-lang/linter/issues/204
86
88
- control_flow_in_finally
87
89
- curly_braces_in_flow_control_structures
90
+
- dangling_library_doc_comments
88
91
- depend_on_referenced_packages
89
92
- deprecated_consistency
93
+
# - deprecated_member_use_from_same_package # we allow self-references to deprecated members
90
94
# - diagnostic_describe_all_properties # enabled only at the framework level (packages/flutter/lib)
91
95
- directives_ordering
92
-
# - discarded_futures # not yet tested
96
+
# - discarded_futures # too many false positives, similar to unawaited_futures
93
97
# - do_not_use_environment # there are appropriate times to use the environment, especially in our tests and build logic
94
98
- empty_catches
95
99
- empty_constructor_bodies
@@ -100,30 +104,40 @@ linter:
100
104
- flutter_style_todos
101
105
- hash_and_equals
102
106
- implementation_imports
103
-
- collection_methods_unrelated_type
107
+
- implicit_call_tearoffs
108
+
- implicit_reopen
109
+
- invalid_case_patterns
104
110
# - join_return_with_assignment # not required by flutter style
105
111
- leading_newlines_in_multiline_strings
112
+
- library_annotations
106
113
- library_names
107
114
- library_prefixes
108
115
- library_private_types_in_public_api
109
116
# - lines_longer_than_80_chars # not required by flutter style
110
-
# - literal_only_boolean_expressions # too many false positives: https://github.com/dart-lang/linter/issues/453
117
+
- literal_only_boolean_expressions
118
+
# - matching_super_parameters # blocked on https://github.com/dart-lang/language/issues/2509
119
+
- missing_code_block_language_in_doc_comment
111
120
- missing_whitespace_between_adjacent_strings
112
-
- no_adjacent_strings_in_list
121
+
#- no_adjacent_strings_in_list # conflicts with prefer_adjacent_string_concatenation
113
122
- no_default_cases
114
123
- no_duplicate_case_values
115
124
- no_leading_underscores_for_library_prefixes
116
125
- no_leading_underscores_for_local_identifiers
126
+
- no_literal_bool_comparisons
117
127
- no_logic_in_create_state
118
128
- no_runtimeType_toString # DIFFERENT FROM FLUTTER/FLUTTER
129
+
- no_self_assignments
130
+
- no_wildcard_variable_uses
119
131
- non_constant_identifier_names
120
132
- noop_primitive_operations
121
133
- null_check_on_nullable_type_parameter
122
134
- null_closures
123
-
# - omit_local_variable_types # opposite of always_specify_types
135
+
# - omit_local_variable_types # conflicts with specify_nonobvious_local_variable_types
136
+
- omit_obvious_local_variable_types
124
137
# - one_member_abstracts # too many false positives
125
138
- only_throw_errors # this does get disabled in a few places where we have legacy code that uses strings et al
# - prefer_constructors_over_static_methods # far too many false positives
140
154
- prefer_contains
141
155
# - prefer_double_quotes # opposite of prefer_single_quotes
142
-
# - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#consider-using--for-short-functions-and-methods
156
+
# - prefer_expression_function_bodies # conflicts with https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md#consider-using--for-short-functions-and-methods
143
157
- prefer_final_fields
144
158
- prefer_final_in_for_each
145
159
- prefer_final_locals
146
-
# - prefer_final_parameters # we should enable this one day when it can be auto-fixed (https://github.com/dart-lang/linter/issues/3104), see also parameter_assignments
160
+
# - prefer_final_parameters # adds too much verbosity
147
161
- prefer_for_elements_to_map_fromIterable
148
162
- prefer_foreach
149
163
- prefer_function_declarations_over_variables
@@ -152,13 +166,13 @@ linter:
152
166
- prefer_if_null_operators
153
167
- prefer_initializing_formals
154
168
- prefer_inlined_adds
155
-
# - prefer_int_literals # conflicts with https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#use-double-literals-for-double-constants
169
+
# - prefer_int_literals # conflicts with https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md#use-double-literals-for-double-constants
156
170
- prefer_interpolation_to_compose_strings
157
171
- prefer_is_empty
158
172
- prefer_is_not_empty
159
173
- prefer_is_not_operator
160
174
- prefer_iterable_whereType
161
-
#- prefer_mixin # Has false positives, see https://github.com/dart-lang/linter/issues/3018
175
+
- prefer_mixin
162
176
# - prefer_null_aware_method_calls # "call()" is confusing to people new to the language since it's not documented anywhere
163
177
- prefer_null_aware_operators
164
178
- prefer_relative_imports
@@ -169,28 +183,35 @@ linter:
169
183
- provide_deprecation_message
170
184
- public_member_api_docs # DIFFERENT FROM FLUTTER/FLUTTER
171
185
- recursive_getters
172
-
# - require_trailing_commas # blocked on https://github.com/dart-lang/sdk/issues/47441
186
+
# - require_trailing_commas # would be nice, but requires a lot of manual work: 10,000+ code locations would need to be reformatted by hand after bulk fix is applied
173
187
- secure_pubspec_urls
174
188
- sized_box_for_whitespace
175
-
#- sized_box_shrink_expand # not yet tested
189
+
- sized_box_shrink_expand
176
190
- slash_for_doc_comments
177
191
- sort_child_properties_last
178
192
- sort_constructors_first
193
+
# - sort_pub_dependencies
179
194
- sort_unnamed_constructors_first
195
+
# - specify_nonobvious_local_variable_types # DIFFERENT FROM FLUTTER/FLUTTER: prefer not requiring explicit types for locals as hover/IDE shows them anyway.
196
+
- specify_nonobvious_property_types
180
197
- test_types_in_equals
181
198
- throw_in_finally
182
199
- tighten_type_of_initializing_formals
183
-
- type_annotate_public_apis# subset of always_specify_types
200
+
- type_annotate_public_apis
184
201
- type_init_formals
202
+
- type_literal_in_constant_pattern
203
+
- unintended_html_in_doc_comment # DIFFERENT FROM FLUTTER/FLUTTER: Disabled due to an issue that has been fixed, so just hasn't been adopted there yet.
185
204
- unawaited_futures # DIFFERENT FROM FLUTTER/FLUTTER: It's disabled there for "too many false positives"; that's not an issue here, and missing awaits have caused production issues in plugins.
186
205
- unnecessary_await_in_return
187
206
- unnecessary_brace_in_string_interps
207
+
- unnecessary_breaks
188
208
- unnecessary_const
189
209
- unnecessary_constructor_name
190
210
# - unnecessary_final # conflicts with prefer_final_locals
191
211
- unnecessary_getters_setters
192
212
# - unnecessary_lambdas # has false positives: https://github.com/dart-lang/linter/issues/498
0 commit comments