Created
December 2, 2021 09:46
-
-
Save mondoktamas/1524ab035a91677f9197f74601e81adc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file configures the analyzer, which statically analyzes Dart code to | |
# check for errors, warnings, and lints. | |
# | |
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled | |
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be | |
# invoked from the command line by running `flutter analyze`. | |
# 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 | |
analyzer: | |
exclude: | |
- test/** | |
- android/** | |
- ios/** | |
- build/** | |
- assets/** | |
- cms/** | |
- "**.g.dart" | |
- "**.gr.dart" | |
errors: | |
missing_required_param: error | |
dead_code: warning | |
invalid_assignment: warning | |
unused_element: warning | |
unused_import: warning | |
todo: ignore | |
linter: | |
# The lint rules applied to this project can be customized in the | |
# section below to disable rules from the `package:flutter_lints/flutter.yaml` | |
# included above or to enable additional rules. A list of all available lints | |
# and their documentation is published at | |
# https://dart-lang.github.io/linter/lints/index.html. | |
# | |
# Instead of disabling a lint rule for the entire project in the | |
# section below, it can also be suppressed for a single line of code | |
# or a specific dart file by using the `// ignore: name_of_lint` and | |
# `// ignore_for_file: name_of_lint` syntax on the line or in the file | |
# producing the lint. | |
rules: | |
#experimental | |
#require_trailing_commas: true | |
prefer_final_fields: true | |
prefer_final_locals: true | |
prefer_final_in_for_each: true | |
cancel_subscriptions: true | |
avoid_types_as_parameter_names: true | |
empty_statements: true | |
no_logic_in_create_state: true | |
unrelated_type_equality_checks: true | |
#experimental | |
use_build_context_synchronously: true | |
always_declare_return_types: true | |
# always_put_required_named_parameters_first: true | |
annotate_overrides: true | |
avoid_shadowing_type_parameters: true | |
avoid_unused_constructor_parameters: true | |
avoid_void_async: true | |
await_only_futures: true | |
camel_case_extensions: true | |
camel_case_types: true | |
constant_identifier_names: false | |
#experimental | |
cast_nullable_to_non_nullable: true | |
curly_braces_in_flow_control_structures: true | |
directives_ordering: true | |
empty_catches: true | |
empty_constructor_bodies: true | |
file_names: true | |
join_return_with_assignment: true | |
library_names: true | |
library_prefixes: true | |
non_constant_identifier_names: true | |
one_member_abstracts: true | |
prefer_collection_literals: true | |
prefer_conditional_assignment: true | |
prefer_constructors_over_static_methods: true | |
prefer_expression_function_bodies: true | |
prefer_single_quotes: true | |
sort_child_properties_last: true | |
sort_constructors_first: true | |
sort_unnamed_constructors_first: true | |
unawaited_futures: true | |
unnecessary_await_in_return: true | |
# Additional information about this file can be found at | |
# https://dart.dev/guides/language/analysis-options |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment