Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
alextekartik committed Aug 15, 2024
1 parent 34ff4fe commit b4e98eb
Show file tree
Hide file tree
Showing 28 changed files with 152 additions and 403 deletions.
75 changes: 15 additions & 60 deletions packages/sqflite_common_ffi_async/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,78 +29,33 @@ linter:
rules:
- always_declare_return_types
- avoid_dynamic_calls
- avoid_empty_else
- avoid_relative_lib_imports
- avoid_shadowing_type_parameters
- avoid_print
- avoid_slow_async_io
- avoid_types_as_parameter_names
- await_only_futures
- camel_case_extensions
- camel_case_types
- cancel_subscriptions
- curly_braces_in_flow_control_structures
# - depend_on_referenced_packages
- deprecated_member_use_from_same_package
- directives_ordering
- empty_catches
- hash_and_equals
- collection_methods_unrelated_type
- implicit_reopen
- invalid_case_patterns
- invalid_runtime_check_with_js_interop_types
- iterable_contains_unrelated_type
- library_names
- list_remove_unrelated_type
- no_adjacent_strings_in_list
- no_duplicate_case_values
- non_constant_identifier_names
- no_literal_bool_comparisons
- no_self_assignments
- omit_local_variable_types
- package_api_docs
- package_prefixed_library_names
- prefer_generic_function_type_aliases
- prefer_is_empty
- prefer_is_not_empty
- prefer_iterable_whereType
- prefer_const_constructors
- prefer_const_literals_to_create_immutables
- prefer_if_elements_to_conditional_expressions
- prefer_single_quotes
- prefer_typing_uninitialized_variables
- prefer_void_to_null
- public_member_api_docs
- sort_child_properties_last
- test_types_in_equals
- throw_in_finally
- unawaited_futures
- unnecessary_null_aware_assignments
- unnecessary_statements
- unrelated_type_equality_checks
- unsafe_html
- use_full_hex_values_for_flutter_colors
- valid_regexps

- constant_identifier_names
- control_flow_in_finally
- empty_statements
- implementation_imports
- overridden_fields
- package_names
- prefer_const_constructors
- prefer_initializing_formals
- prefer_void_to_null
#
- annotate_overrides
- avoid_init_to_null
- avoid_null_checks_in_equality_operators
- avoid_return_types_on_setters
- empty_constructor_bodies
- library_names
- library_prefixes
- prefer_adjacent_string_concatenation
- prefer_collection_literals
- prefer_contains
- slash_for_doc_comments
- type_init_formals
- unnecessary_const
- unnecessary_new
- unnecessary_null_in_if_null_operators
- use_rethrow_when_possible

- dangling_library_doc_comments
- deprecated_member_use_from_same_package
- implicit_reopen
- invalid_case_patterns
- no_literal_bool_comparisons
- no_self_assignments
- no_wildcard_variable_uses
- type_literal_in_constant_pattern
# === doc rules ===
- public_member_api_docs
2 changes: 2 additions & 0 deletions packages/sqflite_common_ffi_async/example/main.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: avoid_print

import 'package:sqflite_common_ffi/sqflite_ffi.dart';
import 'package:sqflite_common_ffi_async/sqflite_ffi_async.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class SqfliteDatabaseFfiAsync extends SqfliteDatabaseBase {
await dir.create(recursive: true);
}
} catch (e) {
// ignore: avoid_print
print('error checking directory $dir: $e');
}
sqliteOptions = const sqlite_async.SqliteOptions.defaults();
Expand Down
3 changes: 2 additions & 1 deletion packages_web/sqflite_common_ffi_web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
sqlite Web implementation (experimental). Features:
- Persistency (in indexeddb)
- Cross-tab safe (runs in a shared worker)
- Wasm compatible

Thanks Simon Binder for the excellent sqlite3 lib.

Expand All @@ -11,7 +12,7 @@ Thanks Simon Binder for the excellent sqlite3 lib.
Add the dependency:
```yaml
dependencies:
sqflite_common_ffi_web: '>=0.1.0-dev.1'
sqflite_common_ffi_web:
```
### Setup binaries
Expand Down
76 changes: 14 additions & 62 deletions packages_web/sqflite_common_ffi_web/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,81 +31,33 @@ linter:
rules:
- always_declare_return_types
- avoid_dynamic_calls
- avoid_empty_else
- avoid_print
- avoid_relative_lib_imports
- avoid_shadowing_type_parameters
- avoid_slow_async_io
- avoid_types_as_parameter_names
- await_only_futures
- camel_case_extensions
- camel_case_types
- cancel_subscriptions
- curly_braces_in_flow_control_structures
# - depend_on_referenced_packages
- deprecated_member_use_from_same_package
- directives_ordering
- empty_catches
- hash_and_equals
- collection_methods_unrelated_type
- implicit_reopen
- invalid_case_patterns
- invalid_runtime_check_with_js_interop_types
- iterable_contains_unrelated_type
- library_names
- list_remove_unrelated_type
- no_adjacent_strings_in_list
- no_duplicate_case_values
- non_constant_identifier_names
- no_literal_bool_comparisons
- no_self_assignments
- omit_local_variable_types
- package_api_docs
- package_prefixed_library_names
- prefer_generic_function_type_aliases
- prefer_is_empty
- prefer_is_not_empty
- prefer_iterable_whereType
- prefer_const_constructors
- prefer_const_literals_to_create_immutables
- prefer_if_elements_to_conditional_expressions
- prefer_single_quotes
- prefer_typing_uninitialized_variables
- prefer_void_to_null
- public_member_api_docs
- sort_child_properties_last
- test_types_in_equals
- throw_in_finally
- unawaited_futures
- unnecessary_null_aware_assignments
- unnecessary_statements
- unrelated_type_equality_checks
- unsafe_html
- use_full_hex_values_for_flutter_colors
- valid_regexps

- constant_identifier_names
- control_flow_in_finally
- empty_statements
- implementation_imports
- overridden_fields
- package_names
- prefer_const_constructors
- prefer_initializing_formals
- prefer_void_to_null
#
- annotate_overrides
- avoid_init_to_null
- avoid_null_checks_in_equality_operators
- avoid_return_types_on_setters
- empty_constructor_bodies
- library_names
- library_prefixes
- prefer_adjacent_string_concatenation
- prefer_collection_literals
- prefer_contains
- slash_for_doc_comments
- type_init_formals
- unnecessary_const
- unnecessary_new
- unnecessary_null_in_if_null_operators
- use_rethrow_when_possible

- dangling_library_doc_comments
- deprecated_member_use_from_same_package
- implicit_reopen
- invalid_case_patterns
- no_literal_bool_comparisons
- no_self_assignments
- no_wildcard_variable_uses
- type_literal_in_constant_pattern
# New in 3.5
- invalid_runtime_check_with_js_interop_types
# === doc rules ===
- public_member_api_docs
80 changes: 15 additions & 65 deletions sqflite/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,82 +28,32 @@ linter:
rules:
- always_declare_return_types
- avoid_dynamic_calls
- avoid_empty_else
- avoid_relative_lib_imports
- avoid_shadowing_type_parameters
- avoid_slow_async_io
- avoid_types_as_parameter_names
- await_only_futures
- camel_case_extensions
- camel_case_types
- cancel_subscriptions
- curly_braces_in_flow_control_structures
- deprecated_member_use_from_same_package
- directives_ordering
- empty_catches
- hash_and_equals
- collection_methods_unrelated_type
- implicit_reopen
- invalid_case_patterns
- invalid_runtime_check_with_js_interop_types
- iterable_contains_unrelated_type
- library_names
- list_remove_unrelated_type
- no_adjacent_strings_in_list
- no_duplicate_case_values
- non_constant_identifier_names
- no_literal_bool_comparisons
- no_self_assignments
- omit_local_variable_types
- package_api_docs
- package_prefixed_library_names
- prefer_generic_function_type_aliases
- prefer_is_empty
- prefer_is_not_empty
- prefer_iterable_whereType
- prefer_final_locals
- prefer_if_elements_to_conditional_expressions
- prefer_single_quotes
- prefer_typing_uninitialized_variables
- sort_child_properties_last
- prefer_void_to_null
- public_member_api_docs
- sort_constructors_first
- sort_unnamed_constructors_first
- test_types_in_equals
- throw_in_finally
- unawaited_futures
- unnecessary_null_aware_assignments
- unnecessary_statements
- unrelated_type_equality_checks
- unsafe_html
- valid_regexps

- constant_identifier_names
- control_flow_in_finally
- empty_statements
- implementation_imports
- overridden_fields
- package_names
- prefer_const_constructors
- prefer_initializing_formals
- prefer_void_to_null
#
- annotate_overrides
- avoid_init_to_null
- avoid_null_checks_in_equality_operators
- avoid_return_types_on_setters
- empty_constructor_bodies
- library_names
- library_prefixes
- prefer_adjacent_string_concatenation
- prefer_collection_literals
- prefer_contains
- slash_for_doc_comments
- type_init_formals
- unnecessary_const
- unnecessary_new
- unnecessary_null_in_if_null_operators
- use_rethrow_when_possible

- dangling_library_doc_comments
- deprecated_member_use_from_same_package
- implicit_reopen
- invalid_case_patterns
- no_literal_bool_comparisons
- no_self_assignments
- no_wildcard_variable_uses
- type_literal_in_constant_pattern

# === doc rules ===
- public_member_api_docs
#
- prefer_final_locals
- sort_constructors_first
- sort_unnamed_constructors_first

Loading

0 comments on commit b4e98eb

Please sign in to comment.