From e3bf6365f4e1b97b94801d7fe3b85ad73607eae2 Mon Sep 17 00:00:00 2001 From: mono Date: Thu, 11 May 2023 12:58:51 +0900 Subject: [PATCH] Change minimum Dart version to '3.0.0' and add some new rules --- CHANGELOG.md | 8 ++++++++ example/pubspec.lock | 24 +++++++++++----------- lib/analysis_options.yaml | 8 ++++++-- pubspec.lock | 42 +++++++++++++++++++-------------------- pubspec.yaml | 4 ++-- 5 files changed, 49 insertions(+), 37 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bcd442..de3df9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 1.22.0 + +- Change minimum Dart version to '3.0.0' 🎯 +- Add `implicit_reopen` +- Add `invalid_case_patterns` +- Add `type_literal_in_constant_pattern` +- Add `unnecessary_breaks` + ## 1.21.1 - Add `combinators_ordering` diff --git a/example/pubspec.lock b/example/pubspec.lock index c664e2c..95a9404 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" collection: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.17.1" flutter: dependency: "direct main" description: flutter @@ -34,18 +34,18 @@ packages: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.7" lints: dependency: transitive description: name: lints - sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + sha256: "6b0206b0bf4f04961fc5438198ccb3a885685cd67d4d4a32cc20ad7f8adbe015" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.0" material_color_utilities: dependency: transitive description: @@ -58,17 +58,17 @@ packages: dependency: "direct main" description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" pedantic_mono: dependency: "direct dev" description: path: ".." relative: true source: path - version: "1.21.1" + version: "1.22.0" sky_engine: dependency: transitive description: flutter @@ -83,4 +83,4 @@ packages: source: hosted version: "2.1.4" sdks: - dart: ">=2.19.0 <4.0.0" + dart: ">=3.0.0 <4.0.0" diff --git a/lib/analysis_options.yaml b/lib/analysis_options.yaml index d2d823f..01dcbb4 100644 --- a/lib/analysis_options.yaml +++ b/lib/analysis_options.yaml @@ -26,7 +26,7 @@ linter: - avoid_private_typedef_functions - avoid_redundant_argument_values - avoid_returning_null - # Not work as documented: https://dart-lang.github.io/linter/lints/avoid_returning_null_for_future.html + # deprecated: https://dart-lang.github.io/linter/lints/avoid_returning_null_for_future.html # - avoid_returning_null_for_future - avoid_returning_this - avoid_setters_without_getters @@ -46,10 +46,12 @@ linter: - directives_ordering # - discarded_futures # - do_not_use_environment - - enable_null_safety + # - enable_null_safety - eol_at_end_of_file - flutter_style_todos - implicit_call_tearoffs + - implicit_reopen + - invalid_case_patterns - join_return_with_assignment - library_annotations - lines_longer_than_80_chars @@ -79,8 +81,10 @@ linter: - throw_in_finally - tighten_type_of_initializing_formals - type_annotate_public_apis + - type_literal_in_constant_pattern - unawaited_futures - unnecessary_await_in_return + - unnecessary_breaks - unnecessary_lambdas - unnecessary_library_directive - unnecessary_null_aware_operator_on_extension_on_nullable diff --git a/pubspec.lock b/pubspec.lock index 3203320..0e5c84b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" cli_util: dependency: transitive description: name: cli_util - sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c" + sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7 url: "https://pub.dev" source: hosted - version: "0.3.5" + version: "0.4.0" collection: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.17.1" file: dependency: transitive description: @@ -53,18 +53,18 @@ packages: dependency: "direct dev" description: name: grinder - sha256: b24948a441fc65d07bc8b219d7ee8d6cc0af4cdb13823e0d3be6d848eb787b04 + sha256: "48495acdb3df702c55c952c6536faf11631b8401a292eb0d182ef332fc568b56" url: "https://pub.dev" source: hosted - version: "0.9.2" + version: "0.9.4" http: dependency: "direct dev" description: name: http - sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "0.13.6" http_parser: dependency: transitive description: @@ -77,18 +77,18 @@ packages: dependency: transitive description: name: lints - sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + sha256: "6b0206b0bf4f04961fc5438198ccb3a885685cd67d4d4a32cc20ad7f8adbe015" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.0" meta: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" path: dependency: transitive description: @@ -101,10 +101,10 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" string_scanner: dependency: transitive description: @@ -125,17 +125,17 @@ packages: dependency: transitive description: name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" yaml: dependency: "direct dev" description: name: yaml - sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: - dart: ">=2.19.0 <4.0.0" + dart: ">=3.0.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 186dd69..cb0e65f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,12 +1,12 @@ name: pedantic_mono description: '[mono edition] Recommended lints for Flutter apps, packages, and plugins to encourage good coding practices.' -version: 1.21.1 +version: 1.22.0 repository: https://github.com/mono0926/pedantic_mono funding: - https://github.com/sponsors/mono0926 environment: - sdk: '>=2.19.0 <3.0.0' + sdk: '>=3.0.0 <4.0.0' dependencies: flutter_lints: ^2.0.1