1- analyzer :
2- # exclude:
3- # - path/to/excluded/files/**
4-
5- # Lint rules and documentation, see http://dart-lang.github.io/linter/lints
6- # NOTE: The contents of `Effective Dart` have been copied over because it does not yet support NNBD
7-
8- linter :
9- rules :
10- # STYLE
11- - camel_case_types
12- - camel_case_extensions
13- - library_names
14- - file_names
15- - library_prefixes
16- - non_constant_identifier_names
17- - constant_identifier_names # prefer
18- - directives_ordering
19- - lines_longer_than_80_chars # avoid
20- - curly_braces_in_flow_control_structures
21- - prefer_single_quotes
22-
23- # DOCUMENTATION
24- - slash_for_doc_comments
25- - package_api_docs # prefer
26- - public_member_api_docs # prefer
27- # - comment_references # Unused because https://github.com/dart-lang/sdk/issues/36974
28-
29- # USAGE
30- - implementation_imports
31- - avoid_relative_lib_imports
32- - prefer_relative_imports
33- - prefer_adjacent_string_concatenation
34- - prefer_interpolation_to_compose_strings # prefer
35- - unnecessary_brace_in_string_interps # avoid
36- - prefer_collection_literals
37- - prefer_is_empty
38- - prefer_is_not_empty
39- - avoid_function_literals_in_foreach_calls # avoid
40- - prefer_iterable_whereType
41- - prefer_function_declarations_over_variables
42- - unnecessary_lambdas
43- - prefer_equal_for_default_values
44- - avoid_init_to_null
45- - unnecessary_getters_setters
46- # - unnecessary_getters # prefer # Disabled pending fix: https://github.com/dart-lang/linter/issues/23
47- # - prefer_expression_function_bodies # consider
48- - unnecessary_this
49- - prefer_initializing_formals
50- - type_init_formals
51- - empty_constructor_bodies
52- - unnecessary_new
53- - unnecessary_const
54- - avoid_catches_without_on_clauses # avoid
55- - avoid_catching_errors
56- - use_rethrow_when_possible
57-
58- # DESIGN
59- - use_to_and_as_if_applicable # prefer
60- - one_member_abstracts # avoid
61- - avoid_classes_with_only_static_members # avoid
62- - prefer_mixin
63- - prefer_final_fields # prefer
64- - use_setters_to_change_properties
65- - avoid_setters_without_getters
66- - avoid_returning_null # avoid
67- - avoid_returning_this # avoid
68- - type_annotate_public_apis # prefer
69- # - prefer_typing_uninitialized_variables # consider
70- - omit_local_variable_types # avoid
71- # - avoid_types_on_closure_parameters # avoid
72- - avoid_return_types_on_setters
73- - prefer_generic_function_type_aliases
74- - avoid_private_typedef_functions # prefer
75- # - use_function_type_syntax_for_parameters # consider
76- - avoid_positional_boolean_parameters # avoid
77- - hash_and_equals
78- - avoid_equals_and_hash_code_on_mutable_classes # avoid
79- - avoid_null_checks_in_equality_operators
1+ include : package:lints/recommended.yaml
0 commit comments