-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathanalysis_options.yaml
46 lines (37 loc) · 1.11 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
include: package:flutter_lints/flutter.yaml
linter:
rules:
# Require explicit return types for functions and methods
always_declare_return_types: true
# Ensure that Futures are awaited
await_only_futures: true
# Disallow unnecessary `await` on non-Futures
unawaited_futures: true
# Allow omitting type annotations when they are clear (e.g., final list = <Foo>[])
always_specify_types: false
# Other recommended lints for readability and good practices
prefer_final_locals: true
prefer_const_constructors: true
prefer_const_declarations: true
unnecessary_new: true
unnecessary_this: true
avoid_print: true
require_trailing_commas: true
analyzer:
strong-mode:
implicit-casts: true
implicit-dynamic: true
language:
strict-inference: false
strict-raw-types: false
errors:
# Keep them as warnings, not errors
missing_return: warning
unchecked_use_of_nullable_value: warning
ambiguous_import: warning
exclude:
- "**/*.g.dart"
- "**/*.freezed.dart"
- "**/*.gen.dart"
- "**/*.mocks.dart"
- "**/*.config.dart"