From 0f35c9b90e5d2a261e7e7a5d84fac10d1f0f9624 Mon Sep 17 00:00:00 2001 From: Oleksandr Prokhorenko Date: Tue, 14 Nov 2023 17:27:19 +0100 Subject: [PATCH] chore: voices packages clean up (#147) * chore: update readme, remove unused files * Create melos_example.iml * Delete analysis_options.yaml * docs (catalyst_analysis): update README * Update analysis_options.1.0.0.yaml * chore: update dart lints * Update README.md * fix typo in workflow file names --- ...ml => flutter-mobile-integration-test.yml} | 0 ...t.yml => flutter-web-integration-test.yml} | 0 catalyst_voices/analysis_options.yaml | 9 ++++-- catalyst_voices/pubspec.yaml | 2 +- catalyst_voices_packages/.idea/.name | 1 - catalyst_voices_packages/.idea/modules.xml | 10 ------ .../runConfigurations/melos_bootstrap.xml | 11 ------- .../.idea/runConfigurations/melos_clean.xml | 11 ------- .../runConfigurations/melos_run_analyze.xml | 11 ------- .../runConfigurations/melos_run_lint_all.xml | 11 ------- .../melos_run_qualitycheck.xml | 11 ------- catalyst_voices_packages/README.md | 31 +++++++++++++------ .../analysis_options.yaml | 0 .../catalyst_analysis/CONTRIBUTING.md | 1 - .../packages/catalyst_analysis/LICENSE | 3 -- .../packages/catalyst_analysis/README.md | 13 ++++---- .../lib/analysis_options.1.0.0.yaml | 19 +++++------- .../packages/catalyst_analysis/pubspec.yaml | 2 +- 18 files changed, 44 insertions(+), 102 deletions(-) rename .github/workflows/{flitter-mobile-integration-test.yml => flutter-mobile-integration-test.yml} (100%) rename .github/workflows/{flitter-web-integration-test.yml => flutter-web-integration-test.yml} (100%) delete mode 100644 catalyst_voices_packages/.idea/.name delete mode 100644 catalyst_voices_packages/.idea/modules.xml delete mode 100644 catalyst_voices_packages/.idea/runConfigurations/melos_bootstrap.xml delete mode 100644 catalyst_voices_packages/.idea/runConfigurations/melos_clean.xml delete mode 100644 catalyst_voices_packages/.idea/runConfigurations/melos_run_analyze.xml delete mode 100644 catalyst_voices_packages/.idea/runConfigurations/melos_run_lint_all.xml delete mode 100644 catalyst_voices_packages/.idea/runConfigurations/melos_run_qualitycheck.xml delete mode 100644 catalyst_voices_packages/analysis_options.yaml delete mode 100644 catalyst_voices_packages/packages/catalyst_analysis/CONTRIBUTING.md delete mode 100644 catalyst_voices_packages/packages/catalyst_analysis/LICENSE diff --git a/.github/workflows/flitter-mobile-integration-test.yml b/.github/workflows/flutter-mobile-integration-test.yml similarity index 100% rename from .github/workflows/flitter-mobile-integration-test.yml rename to .github/workflows/flutter-mobile-integration-test.yml diff --git a/.github/workflows/flitter-web-integration-test.yml b/.github/workflows/flutter-web-integration-test.yml similarity index 100% rename from .github/workflows/flitter-web-integration-test.yml rename to .github/workflows/flutter-web-integration-test.yml diff --git a/catalyst_voices/analysis_options.yaml b/catalyst_voices/analysis_options.yaml index fbd0989085..d5015346bf 100644 --- a/catalyst_voices/analysis_options.yaml +++ b/catalyst_voices/analysis_options.yaml @@ -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: diff --git a/catalyst_voices/pubspec.yaml b/catalyst_voices/pubspec.yaml index 859443fa2f..016c0bc880 100644 --- a/catalyst_voices/pubspec.yaml +++ b/catalyst_voices/pubspec.yaml @@ -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 diff --git a/catalyst_voices_packages/.idea/.name b/catalyst_voices_packages/.idea/.name deleted file mode 100644 index 50288c6db2..0000000000 --- a/catalyst_voices_packages/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -CatalystFlutter \ No newline at end of file diff --git a/catalyst_voices_packages/.idea/modules.xml b/catalyst_voices_packages/.idea/modules.xml deleted file mode 100644 index 229b0f9208..0000000000 --- a/catalyst_voices_packages/.idea/modules.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/catalyst_voices_packages/.idea/runConfigurations/melos_bootstrap.xml b/catalyst_voices_packages/.idea/runConfigurations/melos_bootstrap.xml deleted file mode 100644 index d5715306fb..0000000000 --- a/catalyst_voices_packages/.idea/runConfigurations/melos_bootstrap.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git a/catalyst_voices_packages/.idea/runConfigurations/melos_clean.xml b/catalyst_voices_packages/.idea/runConfigurations/melos_clean.xml deleted file mode 100644 index f45d436249..0000000000 --- a/catalyst_voices_packages/.idea/runConfigurations/melos_clean.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git a/catalyst_voices_packages/.idea/runConfigurations/melos_run_analyze.xml b/catalyst_voices_packages/.idea/runConfigurations/melos_run_analyze.xml deleted file mode 100644 index 4287f1c5eb..0000000000 --- a/catalyst_voices_packages/.idea/runConfigurations/melos_run_analyze.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git a/catalyst_voices_packages/.idea/runConfigurations/melos_run_lint_all.xml b/catalyst_voices_packages/.idea/runConfigurations/melos_run_lint_all.xml deleted file mode 100644 index ad6581896e..0000000000 --- a/catalyst_voices_packages/.idea/runConfigurations/melos_run_lint_all.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git a/catalyst_voices_packages/.idea/runConfigurations/melos_run_qualitycheck.xml b/catalyst_voices_packages/.idea/runConfigurations/melos_run_qualitycheck.xml deleted file mode 100644 index 799b410fe3..0000000000 --- a/catalyst_voices_packages/.idea/runConfigurations/melos_run_qualitycheck.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git a/catalyst_voices_packages/README.md b/catalyst_voices_packages/README.md index 127078d113..92240d8466 100644 --- a/catalyst_voices_packages/README.md +++ b/catalyst_voices_packages/README.md @@ -1,11 +1,12 @@ -# Catalyst Flutter +# Catalyst Voices Packages A collection of Catalyst packages and plugins for Flutter and Dart. -* [Catalyst Flutter](#catalyst-flutter) +* [Catalyst Voices Packages](#catalyst-voices-packages) * [Packages](#packages) * [Requirements](#requirements) * [Bootstrapping](#bootstrapping) + * [Contributing](#contributing) * [Support](#support) * [License](#license) @@ -17,9 +18,9 @@ A collection of Catalyst packages and plugins for Flutter and Dart. ## Requirements -* Flutter: 3.13.4+ -* Dart: 3.1.2+ -* Xcode: 14.2+ +* Flutter: 3.13.9+ +* Dart: 3.1.5+ +* Xcode: 15.0+ * Android Studio: Android Studio Electric Eel | 2022.1.1 + * [Melos](https://melos.invertase.dev) * Flutter & Dart plugins: @@ -30,16 +31,26 @@ A collection of Catalyst packages and plugins for Flutter and Dart. ## Bootstrapping ```sh -git clone TODO(minikin): add repo -cd catalyst_flutter +git clone https://github.com/input-output-hk/catalyst-voices.git +cd catalyst-voices melos bootstrap ``` +## Contributing + +We welcome contributions from the community! +Please read our [CONTRIBUTING](https://github.com/input-output-hk/catalyst-voices/blob/main/CONTRIBUTING.md) +for guidelines on how to contribute. + ## Support -Post issues and feature requests on the GitHub [issue tracker](TODO(minikin)). +Post issues and feature requests on the GitHub [issue tracker](https://github.com/input-output-hk/catalyst-voices/issues). ## License -The source code of Popover project is available under the TODO(minikin): add license. -See the [LICENSE](TODO(minikin)) file for more info. +Licensed under either of [Apache License, Version 2.0](https://github.com/input-output-hk/catalyst-voices/blob/main/LICENSE-APACHE) +or [MIT license](https://github.com/input-output-hk/catalyst-voices/blob/main/LICENSE-MIT) at your option. + +Unless you explicitly state otherwise, any contribution intentionally submitted +for inclusion in this crate by you, as defined in the Apache-2.0 license, shall +be dual licensed as above, without any additional terms or conditions. diff --git a/catalyst_voices_packages/analysis_options.yaml b/catalyst_voices_packages/analysis_options.yaml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/catalyst_voices_packages/packages/catalyst_analysis/CONTRIBUTING.md b/catalyst_voices_packages/packages/catalyst_analysis/CONTRIBUTING.md deleted file mode 100644 index 464090415c..0000000000 --- a/catalyst_voices_packages/packages/catalyst_analysis/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -# TODO diff --git a/catalyst_voices_packages/packages/catalyst_analysis/LICENSE b/catalyst_voices_packages/packages/catalyst_analysis/LICENSE deleted file mode 100644 index 9d3c1d065a..0000000000 --- a/catalyst_voices_packages/packages/catalyst_analysis/LICENSE +++ /dev/null @@ -1,3 +0,0 @@ -# 1.0.0 - -- Initial release. \ No newline at end of file diff --git a/catalyst_voices_packages/packages/catalyst_analysis/README.md b/catalyst_voices_packages/packages/catalyst_analysis/README.md index 415eeb340c..bd429fcf09 100644 --- a/catalyst_voices_packages/packages/catalyst_analysis/README.md +++ b/catalyst_voices_packages/packages/catalyst_analysis/README.md @@ -1,7 +1,8 @@ # 🧐 Catalyst Analysis This package provides lint rules for Dart and Flutter which are used at [Catalyst @ IOG](https://github.com/input-output-hk). -For more information, see the [complete list of options](TODO(minikin)). +For more information, +see the [complete list of options](/catalyst_voices_packages/packages/catalyst_analysis/lib/analysis_options.1.0.0.yaml). > This package was heavily inspired by [lint](https://pub.dev/packages/lints) > and real-life experience building products with Dart and Flutter. @@ -79,10 +80,10 @@ As the Dart language and its ecosystem evolve, it is important to keep lint sets Regularly updating them to reflect the best practices for writing Dart code. To accomplish this, we have an informal process in place: -1. Individuals can submit an [issue](TODO(minikin)) to discuss potential changes to the lint sets - (such as adding or removing a lint). - Feedback is welcome from all Dart/Flutter users. +* Individuals can submit an [issue](https://github.com/input-output-hk/catalyst-voices/issues) +to discuss potential changes to the lint sets (such as adding or removing a lint). +Feedback is welcome from all Dart/Flutter users. -2. Catalyst Engineering team meets periodically to review suggestions and make decisions on what to change. +* Catalyst Engineering team meets periodically to review suggestions and make decisions on what to change. -3. Once the updates are made, a new version of the package is published. +* Once the updates are made, a new version of the package is published. diff --git a/catalyst_voices_packages/packages/catalyst_analysis/lib/analysis_options.1.0.0.yaml b/catalyst_voices_packages/packages/catalyst_analysis/lib/analysis_options.1.0.0.yaml index d4090284ae..2ba95d1142 100644 --- a/catalyst_voices_packages/packages/catalyst_analysis/lib/analysis_options.1.0.0.yaml +++ b/catalyst_voices_packages/packages/catalyst_analysis/lib/analysis_options.1.0.0.yaml @@ -4,21 +4,17 @@ analyzer: strict-inference: true strict-raw-types: true - errors: - missing_required_param: error - missing_return: error - 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 @@ -40,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 @@ -60,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 @@ -77,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 @@ -94,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 @@ -117,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 @@ -170,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 diff --git a/catalyst_voices_packages/packages/catalyst_analysis/pubspec.yaml b/catalyst_voices_packages/packages/catalyst_analysis/pubspec.yaml index a39a43c081..cec09dc51d 100644 --- a/catalyst_voices_packages/packages/catalyst_analysis/pubspec.yaml +++ b/catalyst_voices_packages/packages/catalyst_analysis/pubspec.yaml @@ -3,4 +3,4 @@ version: 1.0.0 description: Lint rules for Dart and Flutter used internally at Catalyst. environment: - sdk: '>=3.1.2 <4.0.0' \ No newline at end of file + sdk: '>=3.1.5 <4.0.0' \ No newline at end of file