-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalysis_options.yaml
47 lines (44 loc) · 1.43 KB
/
analysis_options.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
include: package:flutter_lints/flutter.yaml
analyzer:
errors:
invalid_annotation_target: ignore
avoid_print: error
unused_import: warning
duplicate_import: info
dead_code: error
todo: ignore
linter:
rules:
# for commas, if code goes far from specific width length
# https://dart.dev/tools/linter-rules/require_trailing_commas
- require_trailing_commas
# in code if something is var and it should be final
# it helps you to put them
# https://dart.dev/tools/linter-rules/prefer_final_locals
- prefer_final_locals
# for tear-offs, check out
# https://dart.dev/tools/linter-rules/unnecessary_lambdas
- unnecessary_lambdas
- unnecessary_late
- avoid_dynamic_calls
# reminds to close stream_subscriptions
- cancel_subscriptions
- use_colored_box
- use_decorated_box
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
dart_code_metrics:
rules:
# FLUTTER RULES
- use-closest-build-context
# BLOC RULES
- avoid-passing-bloc-to-bloc
- avoid-passing-build-context-to-blocs
- avoid-bloc-public-methods
- avoid-duplicate-bloc-event-handlers
- prefer-correct-bloc-provider
- prefer-multi-bloc-provider
- prefer-sealed-bloc-state:
name-pattern: State$
- prefer-sealed-bloc-events:
name-pattern: Event$