|
| 1 | +include: package:flutter_lints/flutter.yaml |
| 2 | + |
| 3 | +linter: |
| 4 | + rules: |
| 5 | + avoid_print: true |
| 6 | + avoid_unnecessary_containers: true |
| 7 | + avoid_web_libraries_in_flutter: true |
| 8 | + no_logic_in_create_state: false |
| 9 | + prefer_const_constructors: true |
| 10 | + prefer_const_constructors_in_immutables: true |
| 11 | + prefer_const_declarations: true |
| 12 | + prefer_const_literals_to_create_immutables: true |
| 13 | + sized_box_for_whitespace: true |
| 14 | + use_full_hex_values_for_flutter_colors: true |
| 15 | + always_declare_return_types: true |
| 16 | + cancel_subscriptions: true |
| 17 | + close_sinks: true |
| 18 | + comment_references: false |
| 19 | + one_member_abstracts: false |
| 20 | + only_throw_errors: true |
| 21 | + package_api_docs: true |
| 22 | + prefer_single_quotes: true |
| 23 | + sort_child_properties_last: true |
| 24 | + camel_case_types: true |
| 25 | + library_names: true |
| 26 | + avoid_relative_lib_imports: false |
| 27 | + file_names: true |
| 28 | + library_prefixes: true |
| 29 | + non_constant_identifier_names: true |
| 30 | + constant_identifier_names: false |
| 31 | + directives_ordering: true |
| 32 | + curly_braces_in_flow_control_structures: true |
| 33 | + slash_for_doc_comments: false |
| 34 | + prefer_interpolation_to_compose_strings: true |
| 35 | + prefer_collection_literals: true |
| 36 | + avoid_function_literals_in_foreach_calls: false |
| 37 | + avoid_init_to_null: true |
| 38 | + prefer_initializing_formals: true |
| 39 | + type_init_formals: true |
| 40 | + empty_constructor_bodies: true |
| 41 | + empty_statements: true |
| 42 | + unnecessary_new: true |
| 43 | + unnecessary_this: true |
| 44 | + unnecessary_const: true |
| 45 | + unnecessary_overrides: true |
| 46 | + unnecessary_parenthesis: true |
| 47 | + unnecessary_getters_setters: true |
| 48 | + avoid_setters_without_getters: true |
| 49 | + avoid_return_types_on_setters: true |
| 50 | + parameter_assignments: true |
| 51 | + prefer_function_declarations_over_variables: false |
| 52 | + unawaited_futures: true |
| 53 | + prefer_relative_imports: true |
| 54 | + annotate_overrides: false |
| 55 | + overridden_fields: false |
| 56 | + implementation_imports: false |
| 57 | + no_leading_underscores_for_local_identifiers: true |
| 58 | + depend_on_referenced_packages: false |
| 59 | + use_super_parameters: true |
| 60 | + use_build_context_synchronously: true |
| 61 | + |
| 62 | +analyzer: |
| 63 | + errors: |
| 64 | + missing_required_param: error |
| 65 | + missing_return: error |
| 66 | + parameter_assignments: error |
| 67 | + use_setters_to_change_properties: ignore |
| 68 | + deprecated_member_use: warning |
| 69 | + deprecated_member_use_from_same_package: warning |
| 70 | + no_leading_underscores_for_local_identifiers: warning |
| 71 | + use_super_parameters: warning |
| 72 | + use_build_context_synchronously: warning |
| 73 | + todo: warning |
| 74 | + exclude: |
| 75 | + - "**.mocks.dart" |
| 76 | + - "**.g.dart" |
| 77 | + plugins: |
| 78 | + - dart_code_linter |
| 79 | + |
| 80 | +dart_code_linter: |
| 81 | + metrics: |
| 82 | + cyclomatic-complexity: 20 |
| 83 | + maximum-nesting-level: 5 |
| 84 | + number-of-methods: 10 |
| 85 | + source-lines-of-code: 250 |
| 86 | + metrics-exclude: |
| 87 | + - test/** |
| 88 | + rules: |
| 89 | + - avoid-non-null-assertion #IS001 |
| 90 | + - avoid-dynamic #IS015 |
| 91 | + - avoid-returning-widgets #IS021 |
| 92 | + - avoid-nested-conditional-expressions #IS024 |
| 93 | + - avoid-unnecessary-type-casts #IS030 |
| 94 | + - avoid-unnecessary-conditionals |
| 95 | + - avoid-unused-parameters: #Cuidado puede afectar la retro compatibilidad |
| 96 | + severity: none |
| 97 | + - missing-test-assertion #IS035 |
| 98 | + - newline-before-return: #comentar en proyectos anteriores para no geenrar mucho ruido |
| 99 | + severity: none |
| 100 | + - no-boolean-literal-compare |
| 101 | + - no-empty-block # Quitarla puede ser una opcion |
| 102 | + - no-equal-then-else |
| 103 | + - no-magic-number |
| 104 | + - prefer-trailing-comma: #S/N |
| 105 | + severity: none |
| 106 | + - prefer-conditional-expressions |
| 107 | + - prefer-immediate-return |
| 108 | + - prefer-moving-to-variable |
| 109 | + - format-comment: |
| 110 | + only-doc-comments: true |
| 111 | + - member-ordering: |
| 112 | + order: |
| 113 | + - constructors |
| 114 | + - public-fields |
| 115 | + - private-fields |
| 116 | + - close-method |
| 117 | + - dispose-method |
| 118 | + widgets-order: |
| 119 | + - constructor |
| 120 | + - build-method |
| 121 | + - init-state-method |
| 122 | + - did-change-dependencies-method |
| 123 | + - did-update-widget-method |
| 124 | + - dispose-method |
| 125 | + #Flutter |
| 126 | + - always-remove-listener |
| 127 | + - avoid-unnecessary-setstate |
| 128 | + - prefer-extracting-callbacks |
| 129 | + - prefer-using-list-view |
| 130 | + - avoid-ignoring-return-values: |
| 131 | + severity: none |
| 132 | + - avoid-passing-async-when-sync-expected: |
| 133 | + exclude: |
| 134 | + - test/** |
| 135 | + - avoid-unnecessary-type-assertions |
| 136 | + - avoid-unrelated-type-assertions |
| 137 | + - double-literal-format |
| 138 | + - prefer-async-await |
| 139 | + - prefer-correct-identifier-length: |
| 140 | + max-identifier-length: 35 |
| 141 | + min-identifier-length: 3 |
| 142 | + - prefer-correct-test-file-name |
| 143 | + - prefer-correct-type-name: |
| 144 | + min-length: 3 |
| 145 | + max-length: 35 |
| 146 | + - prefer-first |
| 147 | + - prefer-last |
| 148 | + - prefer-match-file-name: |
| 149 | + exclude: |
| 150 | + - test/** |
| 151 | + - avoid-border-all |
| 152 | + - avoid-expanded-as-spacer |
| 153 | + - avoid-wrapping-in-padding |
| 154 | + - no-blank-line-before-single-return |
| 155 | + - prefer-first-or-null |
| 156 | + - prefer-single-quotes |
| 157 | + |
| 158 | + anti-patterns: |
| 159 | + - long-method |
| 160 | + - long-parameter-list |
0 commit comments