diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 0caa2a5..cfc92af 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -11,7 +11,7 @@ jobs: publish: runs-on: ubuntu-latest - if: github.event.pull_request.merged == true && startswith(github.head_ref, 'release/') + if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') steps: - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 397cae6..f974b11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,28 @@ +## 3.0.0 + +- Bumped the minimum required Dart SDK version to `2.18.0`. +- Removed `exclude:` specification + - Use `ignore_for_file` with build.yaml instead. +- Removed `invalid_annotation_target: ignore` + - If you are using freezed, add it to analysis_options.yaml. +- Added Lints. + - `unnecessary_to_list_in_spreads` + - `unnecessary_null_aware_operator_on_extension_on_nullable` +- Removed Lints. + - `invariant_booleans` + +### Reference + +- https://github.com/dart-lang/sdk/blob/main/CHANGELOG.md#2180 +- https://pub.dev/packages/source_gen#configuring-combining_builder-ignore_for_file +- https://github.com/rrousselGit/freezed/issues/488 +- https://github.com/dart-lang/linter/releases/tag/1.23.0 +- https://github.com/dart-lang/linter/releases/tag/1.24.0 +- https://github.com/dart-lang/linter/releases/tag/1.25.0 +- https://dart-lang.github.io/linter/lints/unnecessary_to_list_in_spreads.html +- https://dart-lang.github.io/linter/lints/unnecessary_null_aware_operator_on_extension_on_nullable.html +- https://dart-lang.github.io/linter/lints/invariant_booleans.html + ## 2.0.0 - Bumped the minimum required Dart SDK version to `2.17.5`. diff --git a/example/pubspec.lock b/example/pubspec.lock index 7ea15ae..045ff78 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -7,14 +7,14 @@ packages: path: ".." relative: true source: path - version: "1.0.0" + version: "3.0.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.2.1" collection: dependency: transitive description: @@ -47,14 +47,14 @@ packages: name: material_color_utilities url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.5" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.7.0" + version: "1.8.0" sky_engine: dependency: transitive description: flutter @@ -68,4 +68,4 @@ packages: source: hosted version: "2.1.2" sdks: - dart: ">=2.17.0 <3.0.0" + dart: ">=2.18.0 <3.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index fa7816d..4bd34b6 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -3,7 +3,7 @@ description: A example of blendthink_lints. version: 1.0.0 publish_to: 'none' environment: - sdk: '>=2.17.0 <3.0.0' + sdk: '>=2.18.0 <3.0.0' dependencies: flutter: diff --git a/lib/recommended.yaml b/lib/recommended.yaml index 8dac956..378b1f7 100644 --- a/lib/recommended.yaml +++ b/lib/recommended.yaml @@ -7,11 +7,6 @@ analyzer: errors: # https://dart.dev/tools/diagnostic-messages missing_required_param: warning missing_return: warning - invalid_annotation_target: ignore # Reason: https://github.com/rrousselGit/freezed/issues/488 - exclude: - - "**/*.g.dart" - - "**/*.freezed.dart" - - "**/*.mocks.dart" linter: # https://dart-lang.github.io/linter/lints/ rules: @@ -25,7 +20,8 @@ linter: # https://dart-lang.github.io/linter/lints/ - close_sinks - comment_references #- diagnostic_describe_all_properties # use as you like - - invariant_booleans # experimental + #- discarded_futures # use as you like + #- invariant_booleans # deprecated - literal_only_boolean_expressions - no_adjacent_strings_in_list #- prefer_relative_imports # exclude to use always_use_package_imports @@ -40,6 +36,7 @@ linter: # https://dart-lang.github.io/linter/lints/ #- always_put_required_named_parameters_first # use as you like #- always_specify_types # exclude to use avoid_types_on_closure_parameters, omit_local_variable_types - avoid_annotating_with_dynamic + #- avoid_as # deprecated - avoid_bool_literals_in_conditional_expressions - avoid_catches_without_on_clauses - avoid_catching_errors @@ -83,6 +80,7 @@ linter: # https://dart-lang.github.io/linter/lints/ - parameter_assignments - prefer_asserts_in_initializer_lists #- prefer_asserts_with_message # use as you like + #- prefer_bool_in_asserts # deprecated - prefer_constructors_over_static_methods #- prefer_double_quotes # exclude to use prefer_single_quotes #- prefer_expression_function_bodies # use as you like @@ -100,15 +98,18 @@ linter: # https://dart-lang.github.io/linter/lints/ - sized_box_shrink_expand - sort_constructors_first - sort_unnamed_constructors_first + #- super_goes_last # deprecated - tighten_type_of_initializing_formals - type_annotate_public_apis - unawaited_futures - unnecessary_await_in_return #- unnecessary_final # exclude to use prefer_final_locals - unnecessary_lambdas + - unnecessary_null_aware_operator_on_extension_on_nullable - unnecessary_null_checks # experimental - unnecessary_parenthesis - unnecessary_raw_strings + - unnecessary_to_list_in_spreads - use_colored_box - use_decorated_box - use_enums # experimental diff --git a/pubspec.yaml b/pubspec.yaml index ac3a629..e19792a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,13 +1,13 @@ name: blendthink_lints description: Recommended by blendthink set of lints for Flutter mobile apps to encourage good coding practices. -version: 2.0.0 +version: 3.0.0 homepage: https://github.com/blendthink/flutter-mobile-lints environment: - sdk: ">=2.17.5 <3.0.0" + sdk: ">=2.18.0 <3.0.0" dependencies: - flutter_lints: + flutter_lints: ^2.0.1 dev_dependencies: grinder: ^0.9.2