amplify_lints 1.1.0
amplify_lints: ^1.1.0 copied to clipboard
Lints used in developing Flutter packages and plugins.
AWS Amplify Lints #
Lints used throughout Flutter packages and plugins.
Lints #
The linter rules in this package are derived from the Dart team's lints package (for Dart packages) and flutter_lints (for Flutter apps/plugins/packages). A link to the description for each of the additional linter rules is provided below. More detail about linter rules can be found on the official linter rules homepage.
Dart packages (dart.yaml
) #
In addition to the rules recommended in the lints
package:
- always_declare_return_types
- avoid_catches_without_on_clauses
- avoid_equals_and_hash_code_on_mutable_classes
- avoid_positional_boolean_parameters
- avoid_print
- avoid_type_to_string
- avoid_unused_constructor_parameters
- avoid_void_async
- cancel_subscriptions
- close_sinks
- directives_ordering
- missing_whitespace_between_adjacent_strings
- only_throw_errors
- package_api_docs
- prefer_asserts_with_message
- prefer_const_constructors
- prefer_const_constructors_in_immutables
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
- prefer_single_quotes
- public_member_api_docs
- sort_unnamed_constructors_first
- sort_pub_dependencies
- type_annotate_public_apis
- unnecessary_await_in_return
- unnecessary_lambdas
Flutter packages/plugins (flutter_lib.yaml
) #
All of the previous linter rules plus:
Flutter apps (flutter_app.yaml
) #
Flutter apps will make use of a subset of the linter rules mentioned above, namely:
- avoid_catches_without_on_clauses
- cancel_subscriptions
- close_sinks
- directives_ordering
- only_throw_errors
- prefer_if_elements_to_conditional_expressions
- prefer_single_quotes
- sort_pub_dependencies
- unnecessary_await_in_return
- unnecessary_lambdas
The following new rules will be used as well: