-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanalysis_options.yaml
54 lines (51 loc) · 1.89 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
48
49
50
51
52
53
54
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
formatter:
page_width: 120
analyzer:
exclude:
- lib/generated/*
linter:
rules:
always_declare_return_types: true
always_put_required_named_parameters_first: true
always_use_package_imports: true
avoid_annotating_with_dynamic: true
avoid_dynamic_calls: true
avoid_positional_boolean_parameters: true
avoid_redundant_argument_values: true
avoid_returning_this: true # Cascade operator `..` is preferred if code gets flagged.
avoid_slow_async_io: true
avoid_unused_constructor_parameters: true
cancel_subscriptions: true
close_sinks: true
conditional_uri_does_not_exist: true
directives_ordering: true
join_return_with_assignment: true
noop_primitive_operations: true
only_throw_errors: true
prefer_asserts_with_message: true
prefer_constructors_over_static_methods: true
prefer_final_in_for_each: true
prefer_final_locals: true
prefer_mixin: true
prefer_null_aware_method_calls: true
prefer_single_quotes: true
sized_box_shrink_expand: true # Flutter rule for SizedBox named constructors.
sort_constructors_first: true
sort_pub_dependencies: true
sort_unnamed_constructors_first: true
type_annotate_public_apis: true
unawaited_futures: true
unnecessary_await_in_return: true
unnecessary_lambdas: true
unnecessary_to_list_in_spreads: true
use_colored_box: true # Flutter rule to avoid Container with only a color.
use_decorated_box: true # Flutter rule to avoid Container with only a BoxDecoration.
use_enums: true
use_if_null_to_convert_nulls_to_bools: true
use_is_even_rather_than_modulo: true
use_named_constants: true
use_string_buffers: true
use_super_parameters: true