1
- # version 1.10 .0 - https://dcm.dev/changelog/
1
+ # version 1.12 .0 - https://dcm.dev/changelog/
2
2
dart_code_metrics :
3
3
rules :
4
4
# ## Common
@@ -25,6 +25,7 @@ dart_code_metrics:
25
25
- avoid-duplicate-named-imports
26
26
- avoid-duplicate-patterns
27
27
- avoid-duplicate-switch-case-conditions
28
+ - avoid-duplicate-test-assertions
28
29
- avoid-dynamic
29
30
- avoid-equal-expressions
30
31
- avoid-explicit-pattern-field-name
@@ -37,7 +38,11 @@ dart_code_metrics:
37
38
- avoid-identical-exception-handling-blocks
38
39
- avoid-ignoring-return-values
39
40
- avoid-importing-entrypoint-exports
40
- # - avoid-inferrable-type-arguments # TODO, after config to ignore context.read and context.watch is added
41
+ - avoid-inferrable-type-arguments :
42
+ ignored-invocations :
43
+ - context.read
44
+ - context.watch
45
+ - GetIt.I
41
46
- avoid-inverted-boolean-checks
42
47
- avoid-keywords-in-wildcard-pattern
43
48
# - avoid-late-keyword
@@ -95,7 +100,7 @@ dart_code_metrics:
95
100
- avoid-throw-in-catch-block
96
101
- avoid-throw-objects-without-tostring
97
102
- avoid-top-level-members-in-tests
98
- - avoid-unassigned-late-fields-keyword
103
+ - avoid-unassigned-late-fields
99
104
- avoid-uncaught-future-errors
100
105
- avoid-unconditional-break
101
106
- avoid-unnecessary-call
@@ -126,7 +131,9 @@ dart_code_metrics:
126
131
- format-comment :
127
132
only-doc-comments : true
128
133
# - format-test-name # good but painful
129
- - function-always-returns-null
134
+ - function-always-returns-null :
135
+ ignored-invocations :
136
+ - useEffect
130
137
- map-keys-ordering :
131
138
exclude :
132
139
- test/**
@@ -189,6 +196,7 @@ dart_code_metrics:
189
196
- no-object-declaration
190
197
# - parameters-ordering # way too strict
191
198
# - prefer-addition-subtraction-assignments # dunno
199
+ - prefer-any-or-every
192
200
- prefer-async-await
193
201
- prefer-both-inlining-annotations
194
202
- prefer-bytes-builder
@@ -241,6 +249,7 @@ dart_code_metrics:
241
249
ignore-names :
242
250
- (.*)Provider
243
251
- use(.*)
252
+ - prefer-switch-with-enums
244
253
- prefer-test-matchers
245
254
- prefer-trailing-comma
246
255
# - prefer-type-over-var # we prefer type inference
@@ -252,6 +261,7 @@ dart_code_metrics:
252
261
exclude :
253
262
- test/**
254
263
# - avoid-missing-test-files # * OK, but should be enabled per project
264
+ - avoid-misused-test-matchers
255
265
- prefer-wildcard-pattern
256
266
- tag-name
257
267
- unnecessary-trailing-comma :
@@ -331,6 +341,11 @@ dart_code_metrics:
331
341
- avoid-functions-in-register-singleton :
332
342
severity : error
333
343
344
+ # ## Flutter Hooks
345
+ - avoid-conditional-hooks
346
+ - avoid-hooks-outside-build
347
+ - prefer-use-prefix
348
+
334
349
# ## Intl - not used
335
350
# - prefer-date-format
336
351
# - prefer-intl-name
0 commit comments