fix: analysis_options.yaml include issue by using original rules directly
Showing
1 changed file
with
74 additions
and
1 deletions
1 | -include: package:effective_dart/analysis_options.yaml | 1 | +# Include option is buggy: |
2 | +# https://github.com/flutter/flutter/issues/62591 | ||
3 | +# In case the include issue gets fixed, lines below INCLUDE_FIX | ||
4 | +# can be removed | ||
5 | + | ||
6 | +# include: package:effective_dart/analysis_options.1.2.0.yaml | ||
2 | analyzer: | 7 | analyzer: |
3 | strong-mode: | 8 | strong-mode: |
4 | implicit-casts: false | 9 | implicit-casts: false |
@@ -10,3 +15,71 @@ linter: | @@ -10,3 +15,71 @@ linter: | ||
10 | # Desirable, but would be breaking changes: | 15 | # Desirable, but would be breaking changes: |
11 | avoid_positional_boolean_parameters: false | 16 | avoid_positional_boolean_parameters: false |
12 | constant_identifier_names: false | 17 | constant_identifier_names: false |
18 | + include_file_not_found: false | ||
19 | + | ||
20 | + # INCLUDE_FIX (copy of effective dart 1.2.0) | ||
21 | + # STYLE | ||
22 | + camel_case_types: true | ||
23 | + camel_case_extensions: true | ||
24 | + library_names: true | ||
25 | + file_names: true | ||
26 | + library_prefixes: true | ||
27 | + non_constant_identifier_names: true | ||
28 | + directives_ordering: true | ||
29 | + lines_longer_than_80_chars: true # avoid | ||
30 | + curly_braces_in_flow_control_structures: true | ||
31 | + | ||
32 | + # DOCUMENTATION | ||
33 | + slash_for_doc_comments: true | ||
34 | + package_api_docs: true # prefer | ||
35 | + #- comment_references # Unused because https://github.com/dart-lang/sdk/issues/36974 | ||
36 | + | ||
37 | + # USAGE | ||
38 | + implementation_imports: true | ||
39 | + avoid_relative_lib_imports: true # prefer | ||
40 | + prefer_relative_imports: true # prefer | ||
41 | + prefer_adjacent_string_concatenation: true | ||
42 | + prefer_interpolation_to_compose_strings: true # prefer | ||
43 | + unnecessary_brace_in_string_interps: true # avoid | ||
44 | + prefer_collection_literals: true | ||
45 | + avoid_function_literals_in_foreach_calls: true # avoid | ||
46 | + prefer_iterable_whereType: true | ||
47 | + prefer_function_declarations_over_variables: true | ||
48 | + unnecessary_lambdas: true | ||
49 | + prefer_equal_for_default_values: true | ||
50 | + avoid_init_to_null: true | ||
51 | + unnecessary_getters_setters: true | ||
52 | + #- unnecessary_getters # prefer # Disabled pending fix: https://github.com/dart-lang/linter/issues/23 | ||
53 | + #- prefer_expression_function_bodies # consider | ||
54 | + unnecessary_this: true | ||
55 | + prefer_initializing_formals: true | ||
56 | + type_init_formals: true | ||
57 | + empty_constructor_bodies: true | ||
58 | + unnecessary_new: true | ||
59 | + unnecessary_const: true | ||
60 | + avoid_catches_without_on_clauses: true # avoid | ||
61 | + avoid_catching_errors: true | ||
62 | + use_rethrow_when_possible: true | ||
63 | + | ||
64 | + # DESIGN | ||
65 | + use_to_and_as_if_applicable: true # prefer | ||
66 | + one_member_abstracts: true # avoid | ||
67 | + avoid_classes_with_only_static_members: true # avoid | ||
68 | + prefer_mixin: true | ||
69 | + prefer_final_fields: true # prefer | ||
70 | + use_setters_to_change_properties: true | ||
71 | + avoid_setters_without_getters: true | ||
72 | + avoid_returning_null: true # avoid | ||
73 | + avoid_returning_this: true # avoid | ||
74 | + type_annotate_public_apis: true # prefer | ||
75 | + #- prefer_typing_uninitialized_variables # consider | ||
76 | + omit_local_variable_types: true # avoid | ||
77 | + avoid_types_on_closure_parameters: true # avoid | ||
78 | + avoid_return_types_on_setters: true # avoid | ||
79 | + prefer_generic_function_type_aliases: true | ||
80 | + avoid_private_typedef_functions: true # prefer | ||
81 | + #- use_function_type_syntax_for_parameters # consider | ||
82 | + hash_and_equals: true | ||
83 | + avoid_equals_and_hash_code_on_mutable_classes: true # avoid | ||
84 | + avoid_null_checks_in_equality_operators: true | ||
85 | + |
-
Please register or login to post a comment