Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- include: package:lint/analysis_options.yaml
- analyzer:
- errors:
- sort_constructors_first: error
- prefer_single_quotes: error
- always_specify_types: error
- lines_longer_than_80_chars: error
- # Default warnings to errors
- missing_required_param: error
- missing_return: error
- # Lint warnings to errors
- always_declare_return_types: error
- always_require_non_null_named_parameters: error
- annotate_overrides: error
- avoid_bool_literals_in_conditional_expressions: error
- avoid_catching_errors: error
- avoid_classes_with_only_static_members: error
- avoid_empty_else: error
- avoid_field_initializers_in_const_classes: error
- avoid_function_literals_in_foreach_calls: error
- avoid_implementing_value_types: error
- avoid_init_to_null: error
- avoid_null_checks_in_equality_operators: error
- avoid_positional_boolean_parameters: error
- avoid_print: error
- avoid_private_typedef_functions: error
- avoid_relative_lib_imports: error
- avoid_return_types_on_setters: error
- avoid_returning_null_for_future: error
- avoid_returning_null_for_void: error
- avoid_setters_without_getters: error
- avoid_shadowing_type_parameters: error
- avoid_single_cascade_in_expression_statements: error
- avoid_types_as_parameter_names: error
- avoid_unnecessary_containers: error
- avoid_unused_constructor_parameters: error
- avoid_void_async: error
- avoid_web_libraries_in_flutter: error
- await_only_futures: error
- camel_case_extensions: error
- camel_case_types: error
- cancel_subscriptions: error
- constant_identifier_names: error
- control_flow_in_finally: error
- curly_braces_in_flow_control_structures: error
- directives_ordering: error
- empty_catches: error
- empty_constructor_bodies: error
- empty_statements: error
- file_names: error
- hash_and_equals: error
- implementation_imports: error
- invariant_booleans: error
- iterable_contains_unrelated_type: error
- join_return_with_assignment: error
- library_names: error
- library_prefixes: error
- list_remove_unrelated_type: error
- no_adjacent_strings_in_list: error
- no_duplicate_case_values: error
- non_constant_identifier_names: error
- null_closures: error
- overridden_fields: error
- package_names: error
- package_prefixed_library_names: error
- parameter_assignments: error
- prefer_asserts_in_initializer_lists: error
- prefer_collection_literals: error
- prefer_conditional_assignment: error
- prefer_const_constructors: error
- prefer_const_constructors_in_immutables: error
- prefer_const_declarations: error
- prefer_const_literals_to_create_immutables: error
- prefer_constructors_over_static_methods: error
- prefer_contains: error
- prefer_equal_for_default_values: error
- prefer_final_fields: error
- prefer_final_in_for_each: error
- prefer_final_locals: error
- prefer_for_elements_to_map_fromIterable: error
- prefer_function_declarations_over_variables: error
- prefer_generic_function_type_aliases: error
- prefer_if_elements_to_conditional_expressions: error
- prefer_if_null_operators: error
- prefer_initializing_formals: error
- prefer_inlined_adds: error
- prefer_interpolation_to_compose_strings: error
- prefer_is_empty: error
- prefer_is_not_empty: error
- prefer_is_not_operator: error
- prefer_iterable_whereType: error
- prefer_null_aware_operators: error
- prefer_spread_collections: error
- prefer_typing_uninitialized_variables: error
- prefer_void_to_null: error
- provide_deprecation_message: error
- recursive_getters: error
- slash_for_doc_comments: error
- sort_child_properties_last: error
- sort_pub_dependencies: error
- sort_unnamed_constructors_first: error
- test_types_in_equals: error
- throw_in_finally: error
- type_annotate_public_apis: error
- type_init_formals: error
- unnecessary_await_in_return: error
- unnecessary_brace_in_string_interps: error
- unnecessary_const: error
- unnecessary_getters_setters: error
- unnecessary_new: error
- unnecessary_null_aware_assignments: error
- unnecessary_null_in_if_null_operators: error
- unnecessary_overrides: error
- unnecessary_parenthesis: error
- unnecessary_statements: error
- unnecessary_this: error
- unrelated_type_equality_checks: error
- unsafe_html: error
- use_full_hex_values_for_flutter_colors: error
- use_function_type_syntax_for_parameters: error
- use_rethrow_when_possible: error
- use_setters_to_change_properties: error
- use_string_buffers: error
- valid_regexps: error
- void_checks: error
- linter:
- rules:
- # ------ Disable individual rules ----- #
- # --- #
- # Turn off what you don't like. #
- # ------------------------------------- #
- # Use parameter order as in json response
- always_put_required_named_parameters_first: false
- # Util classes are awesome!
- avoid_classes_with_only_static_members: false
- # ------ Enable individual rules ------ #
- # --- #
- # These rules here are good but too #
- # opinionated to enable them by default #
- # ------------------------------------- #
- # Make constructors the first thing in every class
- sort_constructors_first: true
- # The new tabs vs. spaces. Choose wisely
- prefer_single_quotes: true
- prefer_double_quotes: false
- # Good packages document everything
- public_member_api_docs: false
- # Blindly follow the Flutter code style, which prefers types everywhere
- always_specify_types: true
- # Back to the 80s
- lines_longer_than_80_chars: true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement