Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated lints in easel. #1377

Merged
merged 3 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 117 additions & 26 deletions easel/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,121 @@
# 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`.
include: package:lint/analysis_options.yaml

# 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:
# - build/**
# - lib/**.freezed.dart
- lib/**.g.dart
# - lib/**.gr.dart
# - lib/**.config.dart
# - lib/generated/**.dart
# - lib/modules/*/*
# - test/*/*
# strong-mode:
# implicit-dynamic: true
errors:
avoid_setters_without_getters: ignore
import_of_legacy_library_into_null_safe: error
avoid_single_cascade_in_expression_statements: ignore
null_aware_in_logical_operator: error
missing_required_param: error
# implicit_dynamic_map_literal: ignore
prefer_single_quotes: ignore
sort_unnamed_constructors_first: ignore
prefer_constructors_over_static_methods: ignore
no_leading_underscores_for_local_identifiers: ignore
directives_ordering: ignore
always_use_package_imports: ignore
avoid_classes_with_only_static_members: ignore
missing_return: error
always_declare_return_types: error
override_on_non_overriding_member: error
annotate_overrides: error
avoid_relative_lib_imports: error
avoid_empty_else: error
avoid_returning_null_for_future: error
empty_statements: error
always_put_control_body_on_new_line: error
always_require_non_null_named_parameters: error
avoid_renaming_method_parameters: error
avoid_void_async: error
parameter_assignments: error
constant_identifier_names: ignore
unawaited_futures: error
prefer_expression_function_bodies: error
non_constant_identifier_names: ignore
only_throw_errors: error
exhaustive_cases: error
# always_use_package_imports: error
missing_enum_constant_in_switch: error
require_trailing_commas: ignore
avoid_dynamic_calls: ignore
depend_on_referenced_packages: ignore
implementation_imports: ignore
sort_pub_dependencies: error

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:
sort_pub_dependencies: true
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
- annotate_overrides
- await_only_futures
# - camel_case_types
# - cancel_subscriptions
# - close_sinks
# - comment_references
# - control_flow_in_finally
# - empty_statements
# - always_declare_return_types
# - avoid_empty_else
- avoid_relative_lib_imports
# - avoid_returning_null_for_future
# - always_put_control_body_on_new_line
# - always_require_non_null_named_parameters
# - avoid_renaming_method_parameters
# - avoid_unnecessary_containers
# - avoid_void_async
# - parameter_assignments
# - file_names
# - empty_constructor_bodies
# - unnecessary_parenthesis
# - unnecessary_overrides
# - use_rethrow_when_possible
# - always_use_package_imports
# - avoid_init_to_null
# - avoid_null_checks_in_equality_operators
# - avoid_return_types_on_setters
# - avoid_shadowing_type_parameters
# - avoid_types_as_parameter_names
# - camel_case_extensions
# - curly_braces_in_flow_control_structures
# - empty_catches
# - library_names
# - library_prefixes
# - no_duplicate_case_values
# - null_closures
# - omit_local_variable_types
# - prefer_adjacent_string_concatenation
# - prefer_collection_literals
# - prefer_conditional_assignment
# - prefer_contains
# - prefer_equal_for_default_values
# - prefer_final_fields
# - prefer_for_elements_to_map_fromIterable
# - prefer_generic_function_type_aliases
# - prefer_if_null_operators
# - prefer_is_empty
# - prefer_is_not_empty
# - prefer_iterable_whereType
# - prefer_single_quotes
# - prefer_spread_collections
# - recursive_getters
# - slash_for_doc_comments
# - type_init_formals
# # - unawaited_futures # we don't rely on pedantic package, thus no unawaited() function
# - unnecessary_const
# - unnecessary_new
# - unnecessary_null_in_if_null_operators
# - unnecessary_this
# - unrelated_type_equality_checks
# - use_function_type_syntax_for_parameters
# - valid_regexps
# - exhaustive_cases
# - require_trailing_commas
Loading