Skip to content

Instantly share code, notes, and snippets.

@samanzamani
Last active April 27, 2020 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samanzamani/7500505d7dccce0e696818534edb420e to your computer and use it in GitHub Desktop.
Save samanzamani/7500505d7dccce0e696818534edb420e to your computer and use it in GitHub Desktop.
include: all_lint_rules.yaml
analyzer:
exclude:
- "lib/core/model/g/*.g.dart"
strong-mode:
implicit-casts: false
implicit-dynamic: false
errors:
# Otherwise cause the import of all_lint_rules to warn because of some rules conflicts.
# We explicitly enabled even conflicting rules and are fixing the conflict
# in this file
included_file_warning: ignore
linter:
rules:
# Conflicts with `prefer_single_quotes`
# Single quotes are easier to type and don't compromise on readability.
prefer_double_quotes: false
# Conflicts with `omit_local_variable_types` and other rules.
# As per Dart guidelines, we want to avoid unnecessary types to make the code
# more readable.
# See https://dart.dev/guides/language/effective-dart/design#avoid-type-annotating-initialized-local-variables
always_specify_types: false
# Incompatible with `prefer_final_locals`
# Having immutable local variables makes larger functions more predictible
# so we will use `prefer_final_locals` instead.
unnecessary_final: false
# While very useful for packages, it is too tiresome to apply for private projects.
# Disabling it avoid redundant comments like:
# // The counter
# int count;
public_member_api_docs: false
# Not quite suitable for Flutter, which may have a `build` method with a single
# return, but that return is still complex enough that a "body" is worth it.
prefer_expression_function_bodies: false
# this feature make a lot of boiler plate code and not help to improve readable code
unawaited_futures: false
avoid_as: false
# conflict with implicit-dynamic
avoid_annotating_with_dynamic: false
#according to this rule, we must declare local variables as var which causes a conflict with 'final'
omit_local_variable_types: false
diagnostic_describe_all_properties: false
@behzadcym
Copy link

#according to this rule, we must declare local variables as var which causes a conflict with 'final'
omit_local_variable_types: false

diagnostic_describe_all_properties: false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment