Skip to content

Commit

Permalink
chore: update dart lints
Browse files Browse the repository at this point in the history
  • Loading branch information
minikin committed Nov 14, 2023
1 parent fb51a4b commit 071373c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
9 changes: 6 additions & 3 deletions catalyst_voices/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
include: package:catalyst_analysis/analysis_options.1.0.0.yaml

exclude:
- 'build/**'
- '**/*.g.dart'
analyzer:
exclude: [
build/**,
lib/*.g.dart,
lib/generated/**
]

linter:
rules:
Expand Down
2 changes: 1 addition & 1 deletion catalyst_voices/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
flutter_bloc: ^8.1.3
flutter_localizations:
sdk: flutter
intl: ^0.18.0
intl: ^0.18.1

dev_dependencies:
bloc_test: ^9.1.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,17 @@ analyzer:
strict-inference: true
strict-raw-types: true

errors:
missing_required_param: error
missing_return: error
dead_code: warning

exclude:
- test/.test_coverage.dart
- lib/generated_plugin_registrant.dart

# The full list of lints: https://dart-lang.github.io/linter/lints/index.html
# The full list of lints: https://dart.dev/tools/linter-rules
linter:
rules:
- always_declare_return_types
- always_require_non_null_named_parameters
- always_use_package_imports
- annotate_overrides
# - annotate_redeclares # Enabled as Dart 3.2.0 will be released
- avoid_bool_literals_in_conditional_expressions
- avoid_catching_errors
- avoid_double_and_int_checks
Expand All @@ -41,7 +36,6 @@ linter:
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
- avoid_returning_null
- avoid_returning_null_for_future
- avoid_returning_null_for_void
- avoid_returning_this
Expand All @@ -61,14 +55,17 @@ linter:
- cancel_subscriptions
- cascade_invocations
- cast_nullable_to_non_nullable
- collection_methods_unrelated_type
- comment_references
- conditional_uri_does_not_exist
- constant_identifier_names
- control_flow_in_finally
- curly_braces_in_flow_control_structures
- dangling_library_doc_comments
- depend_on_referenced_packages
- deprecated_consistency
- directives_ordering
- discarded_futures
- empty_catches
- empty_constructor_bodies
- empty_statements
Expand All @@ -78,14 +75,14 @@ linter:
- flutter_style_todos
- hash_and_equals
- implementation_imports
- iterable_contains_unrelated_type
- implicit_reopen
- invalid_case_patterns
- join_return_with_assignment
- leading_newlines_in_multiline_strings
- library_names
- library_prefixes
- library_private_types_in_public_api
- lines_longer_than_80_chars
- list_remove_unrelated_type
- literal_only_boolean_expressions
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
Expand All @@ -95,6 +92,7 @@ linter:
- no_leading_underscores_for_local_identifiers
- no_logic_in_create_state
- no_runtimeType_toString
- no_self_assignments
- non_constant_identifier_names
- noop_primitive_operations
- null_check_on_nullable_type_parameter
Expand All @@ -118,7 +116,6 @@ linter:
- prefer_const_literals_to_create_immutables
- prefer_constructors_over_static_methods
- prefer_contains
- prefer_equal_for_default_values
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
Expand Down Expand Up @@ -171,7 +168,6 @@ linter:
- unnecessary_null_in_if_null_operators
- unnecessary_nullable_for_final_variable_declarations
- unnecessary_overrides
- unnecessary_parenthesis
- unnecessary_raw_strings
- unnecessary_statements
- unnecessary_string_escapes
Expand Down

0 comments on commit 071373c

Please sign in to comment.