extra_pedantic 3.0.0 icon indicating copy to clipboard operation
extra_pedantic: ^3.0.0 copied to clipboard

Stricter Dart analyzer linter settings and best practices.

extra_pedantic #

extra_pedantic on pub.dev Pub.dev Github Stars Twitter Follow GitHub Follow

This is an alternative to lints.

To use extra_pedantic:

  • add it as a dev_dependency to your pubspec.yaml file:
dev_dependencies:
  extra_pedantic: 3.0.0
  • add this line to your analysis_options.yaml file:
include: package:extra_pedantic/analysis_options.yaml

And that's it.


Here is an overview of which lint rules are enabled and disabled:

Rule NameStatusCommentRule Description
always_declare_return_typesNo comment.Declare method return types.
annotate_overridesNo comment.Annotate overridden members.
avoid_null_checks_in_equality_operatorsNo comment.Don't check for null in custom == operators.
prefer_collection_literalsNo comment.Use collection literals when possible.
prefer_conditional_assignmentNo comment.Prefer using ??= over testing for null.
prefer_final_fieldsNo comment.Private field could be final.
prefer_for_elements_to_map_fromIterableNo comment.Prefer 'for' elements when building maps from iterables.
prefer_generic_function_type_aliasesNo comment.Prefer generic function type aliases.
prefer_if_null_operatorsNo comment.Prefer using if null operators.
prefer_spread_collectionsNo comment.Use spread collections when possible.
use_function_type_syntax_for_parametersNo comment.Use generic function type syntax for parameters.
avoid_empty_elseNo comment.Avoid empty else statements.
avoid_init_to_nullNo comment.Don't explicitly initialize variables to null.
avoid_relative_lib_importsNo comment.Avoid relative imports for files in lib/.
avoid_return_types_on_settersNo comment.Avoid return types on setters.
avoid_shadowing_type_parametersNo comment.Avoid shadowing type parameters.
avoid_types_as_parameter_namesNo comment.Avoid types as parameter names.
curly_braces_in_flow_control_structuresNo comment.DO use curly braces for all flow control structures.
empty_catchesNo comment.Avoid empty catch blocks.
empty_constructor_bodiesNo comment.Use ; instead of {} for empty constructor bodies.
library_namesNo comment.Name libraries using lowercase_with_underscores.
library_prefixesNo comment.Use lowercase_with_underscores when specifying a library prefix.
no_duplicate_case_valuesNo comment.Don't use more than one case with same value.
null_closuresNo comment.Do not pass null as an argument where a closure is expected.
prefer_containsNo comment.Use contains for List and String instances.
prefer_equal_for_default_valuesNo comment.Use = to separate a named parameter from its default value.
prefer_is_emptyNo comment.Use isEmpty for Iterables and Maps.
prefer_is_not_emptyNo comment.Use isNotEmpty for Iterables and Maps.
prefer_iterable_whereTypeNo comment.Prefer to use whereType on iterable.
recursive_gettersNo comment.Property getter recursively returns itself.
slash_for_doc_commentsNo comment.Prefer using /// for doc comments.
type_init_formalsNo comment.Don't type annotate initializing formals.
unawaited_futuresNo comment.Future results in async function bodies must be awaited or marked unawaited using dart:async.
unnecessary_constNo comment.Avoid const keyword.
unnecessary_newNo comment.Unnecessary new keyword.
unnecessary_null_in_if_null_operatorsNo comment.Avoid using null in if null operators.
unrelated_type_equality_checksNo comment.Equality operator == invocation with references of unrelated types.
use_rethrow_when_possibleNo comment.Use rethrow to rethrow a caught exception.
valid_regexpsNo comment.Use valid regular expression syntax.
control_flow_in_finallyNo comment.Avoid control flow in finally blocks.
empty_statementsNo comment.Avoid empty statements.
prefer_final_localsNo comment.Prefer final for variable declarations if they are not reassigned.
throw_in_finallyNo comment.Avoid throw in finally block.
await_only_futuresNo comment.Await only futures.
cancel_subscriptionsNo comment.Cancel instances of dart.async.StreamSubscription.
close_sinksNo comment.Close instances of dart.core.Sink.
hash_and_equalsNo comment.Always override hashCode if overriding ==.
implementation_importsNo comment.Don't import implementation files from another package.
package_api_docsNo comment.Provide doc comments for all public APIs.
package_namesNo comment.Use lowercase_with_underscores for package names.
package_prefixed_library_namesNo comment.Prefix library names with the package name and a dot-separated path.
test_types_in_equalsNo comment.Test type arguments in operator ==(Object other).
unnecessary_getters_settersNo comment.Avoid wrapping fields in getters and setters just to be "safe".
void_checksNo comment.Don't assign to void.
type_annotate_public_apisNo comment.Type annotate public APIs.
avoid_slow_async_ioNo comment.Avoid slow async dart:io methods.
invariant_booleansToo many false positives.Conditions should not unconditionally evaluate to true or to false.
iterable_contains_unrelated_typeNo comment.Invocation of Iterable
list_remove_unrelated_typeNo comment.Invocation of remove with references of unrelated types.
literal_only_boolean_expressionsNo comment.Boolean expression composed only with literals.
no_adjacent_strings_in_listNo comment.Don't use adjacent strings in list.
directives_orderingNo comment.Adhere to Effective Dart Guide directives sorting conventions.
only_throw_errorsNo comment.Only throw instances of classes extending either Exception or Error.
prefer_asserts_in_initializer_listsNo comment.Prefer putting asserts in initializer lists.
prefer_const_constructorsNo comment.Prefer const with constant constructors.
prefer_const_constructors_in_immutablesNo comment.Prefer declaring const constructors on @immutable classes.
prefer_typing_uninitialized_variablesNo comment.Prefer typing uninitialized variables and fields.
unnecessary_null_aware_assignmentsNo comment.Avoid null in null-aware assignment.
unnecessary_overridesNo comment.Don't override a method to do a super method invocation with the same parameters.
use_string_buffersNo comment.Use string buffers to compose strings.
use_full_hex_values_for_flutter_colorsNo comment.Prefer an 8-digit hexadecimal integer(0xFFFFFFFF) to instantiate Color.
prefer_inlined_addsNo comment.Inline list item declarations where possible.
unnecessary_parenthesisNo comment.Unnecessary parenthesis can be removed.
prefer_const_declarationsNo comment.Prefer const over final for declarations.
prefer_null_aware_operatorsNo comment.Prefer using null aware operators.
always_put_required_named_parameters_firstNo comment.Put required named parameters first.
avoid_catching_errorsNo comment.Don't explicitly catch Error or types that implement it.
avoid_double_and_int_checksNo comment.Avoid double and int checks.
avoid_implementing_value_typesNo comment.Don't implement classes that override ==.
avoid_js_rounded_intsNo comment.Avoid JavaScript rounded ints.
avoid_returning_null_for_futureNo comment.Avoid returning null for Future.
avoid_returning_null_for_voidNo comment.Avoid returning null for void.
avoid_returning_thisNo comment.Avoid returning this from methods just to enable a fluent interface.
avoid_single_cascade_in_expression_statementsNo comment.Avoid single cascade in expression statements.
avoid_unused_constructor_parametersNo comment.Avoid defining unused parameters in constructors.
avoid_void_asyncNo comment.Avoid async functions that return void.
join_return_with_assignmentNo comment.Join return statement with assignment when possible.
parameter_assignmentsNo comment.Don't reassign references to parameters of functions or methods.
prefer_final_in_for_eachNo comment.Prefer final in for-each loop variable if reference is not reassigned.
prefer_initializing_formalsNo comment.Use initializing formals when possible.
provide_deprecation_messageNo comment.Provide a deprecation message, via @Deprecated("message").
sort_pub_dependenciesNo comment.Sort pub dependencies.
sort_unnamed_constructors_firstNo comment.Sort unnamed constructor declarations first.
unnecessary_await_in_returnNo comment.Unnecessary await keyword in return.
unsafe_htmlNo comment.Avoid unsafe HTML APIs.
file_namesNo comment.Name source files using lowercase_with_underscores.
cast_nullable_to_non_nullableNo comment.Don't cast a nullable value to a non nullable type.
exhaustive_casesNo comment.Define case clauses for all constants in enum-like classes.
prefer_relative_importsNo comment.Prefer relative imports for files in lib/.
tighten_type_of_initializing_formalsNo comment.Tighten type of initializing formal.
avoid_dynamic_callsNo comment.Avoid method calls or property accesses on a "dynamic" target.
avoid_catches_without_on_clausesNo comment.Avoid catches without on clauses.
avoid_type_to_stringNo comment.Avoid
avoid_web_libraries_in_flutterNo comment.Avoid using web-only libraries outside Flutter web plugin packages.
no_default_casesNo comment.No default cases.
no_logic_in_create_stateNo comment.Don't put any logic in createState.
overridden_fieldsNo comment.Don't override fields.
prefer_asserts_with_messageNo comment.Prefer asserts with message.
prefer_mixinNo comment.Prefer using mixins.
prefer_null_aware_method_callsNo comment.Prefer null aware method calls.
sized_box_for_whitespaceDisabled because this rule decreases productivity by disturbing flow.SizedBox for whitespace.
unnecessary_nullable_for_final_variable_declarationsNo comment.Use a non-nullable type for a final variable initialized with a non-nullable value.
unnecessary_statementsNo comment.Avoid using unnecessary statements.
use_build_context_synchronouslyNo comment.Do not use BuildContexts across async gaps.
use_is_even_rather_than_moduloNo comment.Prefer intValue.isOdd/isEven instead of checking the result of % 2.
comment_referencesNo comment.Only reference in scope identifiers in doc comments.
noop_primitive_operationsNo comment.Noop primitive operations.
prefer_final_parametersThis makes it easier to refactor code.Prefer final for parameter declarations if they are not reassigned.
avoid_multiple_declarations_per_lineHas false positives.Don't declare multiple variables on a single line.
avoid_private_typedef_functionsToo pedantic.Avoid private typedef functions.
avoid_final_parametersNo comment.Avoid final for parameter declarations
avoid_returning_nullObsolete because of NNBD.Avoid returning null from members whose return type is bool, double, int, or num.
prefer_if_elements_to_conditional_expressionsDisabled because this rule decreases productivity by disturbing flow.Prefer if elements to conditional expressions where possible.
prefer_foreachDisabled because this rule decreases productivity by disturbing flow.Use forEach to only apply a function to all the elements.
always_require_non_null_named_parametersObsolete because of NNBD.Specify @required on named parameters without defaults.
prefer_void_to_nullObsolete because of NNBD.Don't use the Null type, unless you are positive that you don't want void.
camel_case_extensionsDisabled because an underscore is useful to represent domains in generated code.Name extensions using UpperCamelCase.
omit_local_variable_typesToo pedantic.Omit type annotations for local variables.
prefer_adjacent_string_concatenationNo comment.Use adjacent strings to concatenate string literals.
prefer_single_quotesToo pedantic.Only use double quotes for strings containing single quotes.
always_put_control_body_on_new_lineToo pedantic.Separate the control structure expression from its statement.
always_specify_typesToo pedantic.Specify type annotations.
avoid_asToo pedantic.Avoid using as.
unnecessary_thisToo many false positives.Don't access members with this unless avoiding shadowing.
prefer_bool_in_assertsNo comment.Prefer using a boolean as the assert condition.
use_to_and_as_if_applicableToo pedantic.Start the name of the method with to/_to or as/_as if applicable.
sort_child_properties_lastToo pedantic.Sort child properties last in widget instance creations.
prefer_function_declarations_over_variablesWith variables, the return type can be omitted safely which is useful in FP-style code.Use a function declaration to bind a function to a name.
always_use_package_importsPrefer relative importsAvoid relative imports for files in lib/.
avoid_annotating_with_dynamicIt is better to always be explicit about dynamic.Avoid annotating with dynamic when not required.
avoid_bool_literals_in_conditional_expressionsbool literals in conditional expressions make it easier to reason about them. X ? Y : Z is easier for humans than e.g. X
avoid_classes_with_only_static_membersClasses with static members don't pollute the global namespace.Avoid defining a class that contains only static members.
avoid_escaping_inner_quotesToo pedantic.Avoid escaping inner quotes by converting surrounding quotes.
avoid_function_literals_in_foreach_callsDisabled because this rule decreases productivity by disturbing flow.Avoid using forEach with a function literal.
avoid_equals_and_hash_code_on_mutable_classes@immutable depends on meta.Avoid overloading operator == and hashCode on classes not marked @immutable.
avoid_positional_boolean_parametersToo pedantic.Avoid positional boolean parameters.
avoid_printToo pedantic.Avoid print calls in production code.
avoid_redundant_argument_valuesToo pedantic.Avoid redundant argument values.
avoid_renaming_method_parametersToo pedantic.Don't rename parameters of overridden methods.
avoid_setters_without_gettersToo pedantic.Avoid setters without getters.
avoid_types_on_closure_parametersToo pedantic.Avoid annotating types for function expression parameters.
avoid_unnecessary_containersDisabled because this rule decreases productivity by disturbing flow.Avoid unnecessary containers.
camel_case_typesUnderscores can be useful in generated code.Name types using UpperCamelCase.
cascade_invocationsToo pedantic.Cascade consecutive method invocations on the same reference.
constant_identifier_namesToo pedantic.Prefer using lowerCamelCase for constant names.
deprecated_consistencyToo pedantic.Missing deprecated annotation.
diagnostic_describe_all_propertiesToo pedantic.DO reference all public properties in debug methods.
flutter_style_todosToo pedantic.Use Flutter TODO format: // TODO(username): message, https://URL-to-issue.
do_not_use_environmentToo pedantic.Do not use environment declared variables.
leading_newlines_in_multiline_stringsToo pedantic.Start multiline strings with a newline.
library_private_types_in_public_apiToo pedantic.Avoid using private types in public APIs.
lines_longer_than_80_charsToo pedantic.Avoid lines longer than 80 characters.
missing_whitespace_between_adjacent_stringsToo pedantic.Missing whitespace between adjacent strings.
non_constant_identifier_namesToo pedantic.Name non-constant identifiers using lowerCamelCase.
no_runtimeType_toStringToo pedantic.Avoid calling toString() on runtimeType.
one_member_abstractsToo pedantic.Avoid defining a one-member abstract class when a simple function will do.
prefer_const_literals_to_create_immutablesToo pedantic.Prefer const literals as parameters of constructors on @immutable classes.
prefer_constructors_over_static_methodsToo pedantic.Prefer defining constructors instead of static methods to create instances.
prefer_double_quotesToo pedantic.Prefer double quotes where they won't require escape sequences.
prefer_expression_function_bodiesToo pedantic.Use => for short members whose body is a single return statement.
prefer_interpolation_to_compose_stringsToo pedantic.Use interpolation to compose strings and values.
prefer_int_literalsToo pedantic.Prefer int literals over double literals.
prefer_is_not_operatorToo pedantic.Prefer is! operator.
public_member_api_docsToo pedantic.Document all public members.
sort_constructors_firstToo pedantic.Sort constructor declarations before other members.
super_goes_lastDeprecatedPlace the super call last in a constructor initialization list.
unnecessary_brace_in_string_interpsToo pedantic.Avoid using braces in interpolation when not needed.
unnecessary_finalfinal tells the reader 'This variable won't be mutated.'Don't use final for local variables.
unnecessary_lambdasIn rare cases it is possible for this to introduce bugs.Don't create a lambda when a tear-off will do.
unnecessary_null_checksToo pedantic.Unnecessary null checks.
unnecessary_raw_stringsToo pedantic.Unnecessary raw string.
unnecessary_string_escapesToo pedantic.Remove unnecessary backslashes in strings.
unnecessary_string_interpolationsToo pedantic.Unnecessary string interpolation.
use_if_null_to_convert_nulls_to_boolsToo pedantic.Use if-null operators to convert nulls to bools.
use_key_in_widget_constructorsToo pedantic.Use key in widget constructors.
use_late_for_private_fields_and_variablesToo pedantic.Use late for private members with a non-nullable type.
use_named_constantsThere could be multiple constants with the same value but different identifiers.Use predefined named constants.
use_raw_stringsToo pedantic.Use raw string to avoid escapes.
use_setters_to_change_propertiesToo pedantic.Use a setter for operations that conceptually change a property.
null_check_on_nullable_type_parameterToo many false positives.Don't use null check on a potentially nullable type parameter.
require_trailing_commasToo pedantic.Use trailing commas for all function calls and declarations.
avoid_field_initializers_in_const_classesToo pedantic.Avoid field initializers in const classes.
conditional_uri_does_not_existNo comment.Missing conditional import.
depend_on_referenced_packagesDisabled because this rule decreases productivity by disturbing flow.Depend on referenced packages.
eol_at_end_of_fileToo pedantic.Put a single newline at end of file.
no_leading_underscores_for_library_prefixesToo pedantic.Avoid leading underscores for library prefixes.
no_leading_underscores_for_local_identifiersToo pedantic.Avoid leading underscores for local identifiers.
secure_pubspec_urlsNo comment.Use secure urls in pubspec.yaml.
sized_box_shrink_expandDisabled because this rule decreases productivity by disturbing flow.Use SizedBox shrink and expand named constructors.
unnecessary_constructor_nameNo comment.Unnecessary .new constructor name.
unnecessary_lateNo comment.Don't specify the late modifier when it is not needed.
use_decorated_boxDisabled because this rule decreases productivity by disturbing flow.Use DecoratedBox.
use_test_throws_matchersToo pedantic.Use throwsA matcher instead of fail().
use_colored_boxNo comment.Use ColoredBox.
use_enumsNo comment.Use enums rather than classes that behave like enums.
use_super_parametersSuper parameters make inheritance more convenient, but inheritance should be avoided and composition should be preferred. Even if you need inheritance, you should declare an interface and mixins, and not use super constructors.Use super-initializer parameters where possible.

And here's the whole analysis options file:

# ===============================================================
# ======= This file was generated by extra_pedantic_extra =======
# ===============================================================
analyzer:
  strong-mode:
    # https://github.com/dart-lang/language/tree/master/resources/type-system
    implicit-casts: false
    implicit-dynamic: false
  language:
    # https://github.com/dart-lang/language/tree/master/resources/type-system
    strict-inference: true
    strict-raw-types: true
    strict-casts: true
  # enable-experiment:
    # https://github.com/dart-lang/sdk/blob/main/tools/experimental_features.yaml

linter:
  # All rules: https://github.com/dart-lang/linter/blob/master/lib/src/rules.dart
  rules:
    - unnecessary_overrides # No comment.
    - annotate_overrides # No comment.
    - avoid_null_checks_in_equality_operators # No comment.
    - prefer_collection_literals # No comment.
    - prefer_conditional_assignment # No comment.
    - prefer_final_fields # No comment.
    - prefer_for_elements_to_map_fromIterable # No comment.
    - prefer_generic_function_type_aliases # No comment.
    - prefer_if_null_operators # No comment.
    - prefer_spread_collections # No comment.
    - use_function_type_syntax_for_parameters # No comment.
    - avoid_empty_else # No comment.
    - avoid_init_to_null # No comment.
    - avoid_relative_lib_imports # No comment.
    - avoid_return_types_on_setters # No comment.
    - avoid_shadowing_type_parameters # No comment.
    - avoid_types_as_parameter_names # No comment.
    - curly_braces_in_flow_control_structures # No comment.
    - empty_catches # No comment.
    - empty_constructor_bodies # No comment.
    - library_names # No comment.
    - library_prefixes # No comment.
    - no_duplicate_case_values # No comment.
    - null_closures # No comment.
    - prefer_contains # No comment.
    - prefer_equal_for_default_values # No comment.
    - prefer_is_empty # No comment.
    - prefer_is_not_empty # No comment.
    - prefer_iterable_whereType # No comment.
    - recursive_getters # No comment.
    - slash_for_doc_comments # No comment.
    - type_init_formals # No comment.
    - unawaited_futures # No comment.
    - unnecessary_const # No comment.
    - unnecessary_new # No comment.
    - unnecessary_null_in_if_null_operators # No comment.
    - unrelated_type_equality_checks # No comment.
    - use_rethrow_when_possible # No comment.
    - valid_regexps # No comment.
    - control_flow_in_finally # No comment.
    - empty_statements # No comment.
    - prefer_final_locals # No comment.
    - throw_in_finally # No comment.
    - await_only_futures # No comment.
    - cancel_subscriptions # No comment.
    - close_sinks # No comment.
    - hash_and_equals # No comment.
    - implementation_imports # No comment.
    - package_api_docs # No comment.
    - package_names # No comment.
    - package_prefixed_library_names # No comment.
    - test_types_in_equals # No comment.
    - unnecessary_getters_setters # No comment.
    - void_checks # No comment.
    - type_annotate_public_apis # No comment.
    - avoid_slow_async_io # No comment.
    - iterable_contains_unrelated_type # No comment.
    - list_remove_unrelated_type # No comment.
    - literal_only_boolean_expressions # No comment.
    - no_adjacent_strings_in_list # No comment.
    - directives_ordering # No comment.
    - only_throw_errors # No comment.
    - prefer_asserts_in_initializer_lists # No comment.
    - prefer_const_constructors # No comment.
    - prefer_const_constructors_in_immutables # No comment.
    - prefer_typing_uninitialized_variables # No comment.
    - unnecessary_null_aware_assignments # No comment.
    - always_declare_return_types # No comment.
    - use_string_buffers # No comment.
    - use_full_hex_values_for_flutter_colors # No comment.
    - prefer_inlined_adds # No comment.
    - unnecessary_parenthesis # No comment.
    - prefer_const_declarations # No comment.
    - prefer_null_aware_operators # No comment.
    - always_put_required_named_parameters_first # No comment.
    - avoid_catching_errors # No comment.
    - avoid_double_and_int_checks # No comment.
    - avoid_implementing_value_types # No comment.
    - avoid_js_rounded_ints # No comment.
    - avoid_returning_null_for_future # No comment.
    - avoid_returning_null_for_void # No comment.
    - avoid_returning_this # No comment.
    - avoid_single_cascade_in_expression_statements # No comment.
    - avoid_unused_constructor_parameters # No comment.
    - avoid_void_async # No comment.
    - join_return_with_assignment # No comment.
    - parameter_assignments # No comment.
    - prefer_final_in_for_each # No comment.
    - prefer_initializing_formals # No comment.
    - provide_deprecation_message # No comment.
    - sort_pub_dependencies # No comment.
    - sort_unnamed_constructors_first # No comment.
    - unnecessary_await_in_return # No comment.
    - unsafe_html # No comment.
    - file_names # No comment.
    - cast_nullable_to_non_nullable # No comment.
    - exhaustive_cases # No comment.
    - prefer_relative_imports # No comment.
    - tighten_type_of_initializing_formals # No comment.
    - avoid_dynamic_calls # No comment.
    - avoid_catches_without_on_clauses # No comment.
    - avoid_type_to_string # No comment.
    - avoid_web_libraries_in_flutter # No comment.
    - no_default_cases # No comment.
    - no_logic_in_create_state # No comment.
    - overridden_fields # No comment.
    - prefer_asserts_with_message # No comment.
    - prefer_mixin # No comment.
    - prefer_null_aware_method_calls # No comment.
    - unnecessary_nullable_for_final_variable_declarations # No comment.
    - unnecessary_statements # No comment.
    - use_build_context_synchronously # No comment.
    - use_is_even_rather_than_modulo # No comment.
    - comment_references # No comment.
    - noop_primitive_operations # No comment.
    - prefer_final_parameters # This makes it easier to refactor code.
    - use_colored_box # No comment.
    - use_enums # No comment.
    - unnecessary_late # No comment.
    - unnecessary_constructor_name # No comment.
    - secure_pubspec_urls # No comment.
    - conditional_uri_does_not_exist # No comment.
    # - prefer_if_elements_to_conditional_expressions # Disabled because this rule decreases productivity by disturbing flow.
    # - prefer_foreach # Disabled because this rule decreases productivity by disturbing flow.
    # - always_require_non_null_named_parameters # Obsolete because of NNBD.
    # - prefer_void_to_null # Obsolete because of NNBD.
    # - camel_case_extensions # Disabled because an underscore is useful to represent domains in generated code.
    # - omit_local_variable_types # Too pedantic.
    # - prefer_adjacent_string_concatenation # No comment.
    # - prefer_single_quotes # Too pedantic.
    # - always_put_control_body_on_new_line # Too pedantic.
    # - always_specify_types # Too pedantic.
    # - avoid_as # Too pedantic.
    # - unnecessary_this # Too many false positives.
    # - prefer_bool_in_asserts # No comment.
    # - use_to_and_as_if_applicable # Too pedantic.
    # - use_super_parameters # Super parameters make inheritance more convenient, but inheritance should be avoided and composition should be preferred. Even if you need inheritance, you should declare an interface and mixins, and not use super constructors.
    # - prefer_function_declarations_over_variables # With variables, the return type can be omitted safely which is useful in FP-style code.
    # - always_use_package_imports # Prefer relative imports
    # - avoid_annotating_with_dynamic # It is better to always be explicit about dynamic.
    # - avoid_bool_literals_in_conditional_expressions # bool literals in conditional expressions make it easier to reason about them. X ? Y : Z is easier for humans than e.g. X || Z
    # - avoid_classes_with_only_static_members # Classes with static members don't pollute the global namespace.
    # - avoid_escaping_inner_quotes # Too pedantic.
    # - avoid_function_literals_in_foreach_calls # Disabled because this rule decreases productivity by disturbing flow.
    # - avoid_equals_and_hash_code_on_mutable_classes # @immutable depends on meta.
    # - avoid_positional_boolean_parameters # Too pedantic.
    # - avoid_print # Too pedantic.
    # - avoid_redundant_argument_values # Too pedantic.
    # - avoid_renaming_method_parameters # Too pedantic.
    # - avoid_setters_without_getters # Too pedantic.
    # - avoid_types_on_closure_parameters # Too pedantic.
    # - avoid_unnecessary_containers # Disabled because this rule decreases productivity by disturbing flow.
    # - camel_case_types # Underscores can be useful in generated code.
    # - cascade_invocations # Too pedantic.
    # - constant_identifier_names # Too pedantic.
    # - deprecated_consistency # Too pedantic.
    # - diagnostic_describe_all_properties # Too pedantic.
    # - flutter_style_todos # Too pedantic.
    # - do_not_use_environment # Too pedantic.
    # - leading_newlines_in_multiline_strings # Too pedantic.
    # - library_private_types_in_public_api # Too pedantic.
    # - lines_longer_than_80_chars # Too pedantic.
    # - missing_whitespace_between_adjacent_strings # Too pedantic.
    # - non_constant_identifier_names # Too pedantic.
    # - no_runtimeType_toString # Too pedantic.
    # - one_member_abstracts # Too pedantic.
    # - prefer_const_literals_to_create_immutables # Too pedantic.
    # - prefer_constructors_over_static_methods # Too pedantic.
    # - prefer_double_quotes # Too pedantic.
    # - prefer_expression_function_bodies # Too pedantic.
    # - prefer_interpolation_to_compose_strings # Too pedantic.
    # - prefer_int_literals # Too pedantic.
    # - prefer_is_not_operator # Too pedantic.
    # - public_member_api_docs # Too pedantic.
    # - sort_constructors_first # Too pedantic.
    # - super_goes_last # Deprecated
    # - unnecessary_brace_in_string_interps # Too pedantic.
    # - unnecessary_final # final tells the reader 'This variable won't be mutated.'
    # - unnecessary_lambdas # In rare cases it is possible for this to introduce bugs.
    # - unnecessary_null_checks # Too pedantic.
    # - unnecessary_raw_strings # Too pedantic.
    # - unnecessary_string_escapes # Too pedantic.
    # - unnecessary_string_interpolations # Too pedantic.
    # - use_if_null_to_convert_nulls_to_bools # Too pedantic.
    # - use_key_in_widget_constructors # Too pedantic.
    # - use_late_for_private_fields_and_variables # Too pedantic.
    # - use_named_constants # There could be multiple constants with the same value but different identifiers.
    # - use_raw_strings # Too pedantic.
    # - use_setters_to_change_properties # Too pedantic.
    # - null_check_on_nullable_type_parameter # Too many false positives.
    # - require_trailing_commas # Too pedantic.
    # - avoid_field_initializers_in_const_classes # Too pedantic.
    # - avoid_returning_null # Obsolete because of NNBD.
    # - depend_on_referenced_packages # Disabled because this rule decreases productivity by disturbing flow.
    # - eol_at_end_of_file # Too pedantic.
    # - no_leading_underscores_for_library_prefixes # Too pedantic.
    # - no_leading_underscores_for_local_identifiers # Too pedantic.
    # - avoid_final_parameters # No comment.
    # - sized_box_shrink_expand # Disabled because this rule decreases productivity by disturbing flow.
    # - avoid_private_typedef_functions # Too pedantic.
    # - avoid_multiple_declarations_per_line # Has false positives.
    # - use_decorated_box # Disabled because this rule decreases productivity by disturbing flow.
    # - use_test_throws_matchers # Too pedantic.
    # - sized_box_for_whitespace # Disabled because this rule decreases productivity by disturbing flow.
    # - invariant_booleans # Too many false positives.
    # - sort_child_properties_last # Too pedantic.
19
likes
110
pub points
81%
popularity

Publisher

verified publisher iconmodulovalue.com

Stricter Dart analyzer linter settings and best practices.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Icon for licenses.BSD-3-Clause (LICENSE)

More

Packages that depend on extra_pedantic