@@ -14,9 +14,11 @@ dart_code_metrics:
14
14
rules :
15
15
# ## Common
16
16
# - arguments-ordering # way too pedantic
17
+ # - avoid-accessing-other-classes-private-members # TODO?
17
18
# - avoid-banned-file-names
18
19
# - avoid-banned-imports
19
20
# - avoid-banned-types
21
+ - avoid-barrel-files # TODO?
20
22
- avoid-bottom-type-in-patterns
21
23
- avoid-bottom-type-in-records
22
24
- avoid-cascade-after-if-null
@@ -33,23 +35,33 @@ dart_code_metrics:
33
35
# - avoid-explicit-type-declaration # public API
34
36
- avoid-function-type-in-records
35
37
- avoid-future-tostring
38
+ - avoid-generics-shadowing
36
39
- avoid-global-state
37
40
- avoid-ignoring-return-values
41
+ - avoid-importing-entrypoint-exports
38
42
- avoid-inverted-boolean-checks
43
+ - avoid-keywords-in-wildcard-pattern
39
44
# - avoid-late-keyword
40
45
# - avoid-long-functions # way too pedantic
41
- - avoid-long-parameter-list :
42
- ignore-optional : true # exclude optional and (required) named parameters
46
+ # - avoid-long-parameter-list: # TODO: ?
47
+ # ignore-optional: true # exclude optional and (non- required) named parameters
43
48
- avoid-long-records
44
49
- avoid-missed-calls
45
50
- avoid-missing-enum-constant-in-map
51
+ - avoid-misused-wildcard-pattern
46
52
- avoid-mixing-named-and-positional-fields
53
+ # - avoid-mutating-parameters # TODO: ?
54
+ # - avoid-negated-conditions # TODO: ?
47
55
- avoid-nested-conditional-expressions :
48
56
acceptable-level : 2
57
+ - avoid-nested-futures
49
58
- avoid-nested-records
59
+ - avoid-nested-streams-and-futures
50
60
- avoid-nested-switch-expressions
51
61
- avoid-nested-switches
52
- - avoid-non-ascii-symbols
62
+ - avoid-non-ascii-symbols :
63
+ exclude :
64
+ - test/**
53
65
- avoid-non-null-assertion :
54
66
exclude :
55
67
- test/**
@@ -64,6 +76,7 @@ dart_code_metrics:
64
76
- avoid-redundant-pragma-inline
65
77
- avoid-self-assignment
66
78
- avoid-self-compare
79
+ - avoid-shadowed-extension-methods
67
80
- avoid-shadowing :
68
81
ignore-parameters : true
69
82
ignored-names :
@@ -74,7 +87,10 @@ dart_code_metrics:
74
87
- avoid-throw-objects-without-tostring
75
88
- avoid-top-level-members-in-tests
76
89
- avoid-unassigned-late-fields-keyword
90
+ - avoid-uncaught-future-errors
91
+ - avoid-unnecessary-call
77
92
- avoid-unnecessary-conditionals
93
+ - avoid-unnecessary-futures
78
94
- avoid-unnecessary-negations
79
95
- avoid-unnecessary-nullable-return-type
80
96
- avoid-unnecessary-return
@@ -92,6 +108,7 @@ dart_code_metrics:
92
108
only-doc-comments : true
93
109
# - format-test-name # good but painful
94
110
- function-always-returns-null
111
+ - map-keys-ordering # TODO?
95
112
# - match-positional-field-names-on-assignment # not compatible with avoid-redundant-positional-field-name
96
113
- member-ordering :
97
114
order :
@@ -122,7 +139,8 @@ dart_code_metrics:
122
139
min-fields : 3
123
140
min-occurrences : 3
124
141
- newline-before-return
125
- - no-boolean-literal-compare
142
+ - no-boolean-literal-compare :
143
+ allow-false : true # allows `variable == false` instead of just `!variable`
126
144
- no-empty-block
127
145
- no-equal-arguments :
128
146
ignored-parameters :
@@ -137,6 +155,7 @@ dart_code_metrics:
137
155
- bottomLeft
138
156
- bottomRight
139
157
- no-equal-conditions
158
+ - no-equal-nested-conditions
140
159
- no-equal-switch-case
141
160
- no-equal-switch-expression-cases
142
161
- no-equal-then-else
@@ -146,7 +165,10 @@ dart_code_metrics:
146
165
- prefer-bytes-builder
147
166
- prefer-commenting-analyzer-ignores
148
167
- prefer-conditional-expressions
168
+ - prefer-correct-error-name # TODO: ?
169
+ - prefer-correct-future-return-type
149
170
# - prefer-correct-identifier-length # way too pedantic
171
+ - prefer-correct-stream-return-type
150
172
- prefer-correct-switch-length
151
173
- prefer-correct-test-file-name
152
174
- prefer-correct-type-name
@@ -163,6 +185,9 @@ dart_code_metrics:
163
185
- test/**
164
186
- prefer-moving-to-variable :
165
187
allowed-duplicated-chains : 3
188
+ exclude :
189
+ - test/**
190
+ - prefer-parentheses-with-if-null
166
191
- prefer-return-await
167
192
# - prefer-returning-conditional-expressions # annoying sometimes
168
193
- prefer-simpler-patterns-null-check
@@ -172,7 +197,8 @@ dart_code_metrics:
172
197
- (.*)Provider
173
198
- use(.*)
174
199
- prefer-test-matchers
175
- # - prefer-trailing-comma # already in Dart lints - require_trailing_commas
200
+ - prefer-trailing-comma
201
+ # - prefer-type-over-var # we prefer inference
176
202
# - prefer-unwrapping-future-or # we are ok with awaiting values
177
203
- prefer-visible-for-testing-on-members
178
204
- prefer-wildcard-pattern
@@ -189,10 +215,12 @@ dart_code_metrics:
189
215
- avoid-incomplete-copy-with
190
216
- avoid-inherited-widget-in-initstate
191
217
- avoid-late-context
218
+ - avoid-missing-image-alt # TODO?
192
219
- avoid-returning-widgets
193
220
- avoid-shrink-wrap-in-lists
194
221
- avoid-state-constructors
195
222
- avoid-stateless-widget-initialized-fields
223
+ - avoid-unnecessary-overrides-in-state # TODO?
196
224
- avoid-unnecessary-setstate
197
225
- avoid-unnecessary-stateful-widgets
198
226
- avoid-wrapping-in-padding
@@ -202,6 +230,7 @@ dart_code_metrics:
202
230
- prefer-action-button-tooltip
203
231
- prefer-const-border-radius
204
232
- prefer-correct-edge-insets-constructor
233
+ - prefer-dedicated-media-query-methods
205
234
- prefer-define-hero-tag
206
235
- prefer-extracting-callbacks
207
236
- prefer-single-widget-per-file :
0 commit comments