From 869c06280d54043469272e66938bc36a2cbe7470 Mon Sep 17 00:00:00 2001 From: Paul Kastel Date: Tue, 5 Jul 2022 15:00:43 +0200 Subject: [PATCH] Add new lints for flutter 3.0.4 and metrics 4.16.0 (#4) * Add new lints for flutter 3.0.4 and metrics 4.16.0 --- CHANGELOG.md | 5 +++++ README.md | 4 ++-- lib/miquido_lints.yaml | 2 ++ pubspec.yaml | 6 +++--- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8612aa9..28b025d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.2.4 + +* Lints from dart_metrics version 4.16.0 +* Lints for Flutter 3.0.4 + ## 0.2.0 * Lints from dart_metrics version 4.15.2 diff --git a/README.md b/README.md index 9ac5f78..c75cb64 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ We tested current configuration with this environment: ```yaml environment: sdk: ">=2.17.0 <3.0.0" - flutter: ^3.0.0 + flutter: ^3.0.4 ``` so it is required to update your flutter project to meet this conditions. @@ -43,7 +43,7 @@ dev_dependencies: or -you can copy content of [this file](lib/miquido_lints.yaml) to your `analysis_options.yaml`. In this approach remember that you need to depend on `dart_code_metrics: 4.15.2`, and you will need to add that package to your `pubspec.yaml` as well. Also you will need to visit this repository from time to time to check for changes! +you can copy content of [this file](lib/miquido_lints.yaml) to your `analysis_options.yaml`. In this approach remember that you need to depend on `dart_code_metrics: 4.16.0`, and you will need to add that package to your `pubspec.yaml` as well. Also you will need to visit this repository from time to time to check for changes! Also if you star this repo, that would be nice. diff --git a/lib/miquido_lints.yaml b/lib/miquido_lints.yaml index 0be102e..66de8d0 100644 --- a/lib/miquido_lints.yaml +++ b/lib/miquido_lints.yaml @@ -238,6 +238,7 @@ linter: # to execute run `flutter analyze`. It should show "No issues found!" message. dart_code_metrics: rules: + # - avoid_restricted_imports - this would be good for modular projects and packages - avoid-collection-methods-with-unrelated-types # - avoid-dynamic - as much as we would love to have it, sometimes it is necessary - avoid-global-state @@ -306,6 +307,7 @@ dart_code_metrics: - avoid-wrapping-in-padding # - prefer-const-border-radius - proposed solution is adding extra code complexity for meaningless profit - prefer-extracting-callbacks: + allowed-line-count: 0 ignored-named-arguments: - listener - listenWhen diff --git a/pubspec.yaml b/pubspec.yaml index 7a117da..3b7dd31 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,14 +1,14 @@ name: miquido_flutter_lints description: Collection of Flutter lints that we use and follow in Miquido -version: 0.2.0 +version: 0.2.4 homepage: https://www.miquido.com environment: sdk: ">=2.17.0 <3.0.0" - flutter: ^3.0.0 + flutter: ^3.0.4 dependencies: - dart_code_metrics: 4.15.2 + dart_code_metrics: 4.16.0 flutter: sdk: flutter