Skip to content

Commit

Permalink
Change minimum Dart version to '2.19.0' and add lints
Browse files Browse the repository at this point in the history
  • Loading branch information
mono0926 committed Jan 26, 2023
1 parent a26b316 commit f5459bd
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 55 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 1.21.0

- Change minimum Dart version to '2.19.0'
- Remove deprecated `invariant_booleans`
- Add `enable_null_safety`
- Add `library_annotations`
- Add `dangling_library_doc_comments`
- Add `collection_methods_unrelated_type`
- Add `implicit_call_tearoffs`
- Add `unnecessary_library_directive`
- Add `unreachable_from_main`
- Add `use_string_in_part_of_directives`

## 1.20.1

- Add `language/strict-casts` and remove `strong-mode` (Not behavior change)
Expand Down
41 changes: 28 additions & 13 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ packages:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
url: "https://pub.dev"
source: hosted
version: "1.2.1"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
url: "https://pub.dev"
source: hosted
version: "1.16.0"
version: "1.17.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -24,28 +26,40 @@ packages:
dependency: transitive
description:
name: flutter_lints
url: "https://pub.dartlang.org"
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
url: "https://pub.dev"
source: hosted
version: "2.0.1"
js:
dependency: transitive
description:
name: js
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
url: "https://pub.dev"
source: hosted
version: "0.6.5"
lints:
dependency: transitive
description:
name: lints
url: "https://pub.dartlang.org"
sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
version: "2.0.1"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
url: "https://pub.dev"
source: hosted
version: "0.1.5"
version: "0.2.0"
meta:
dependency: "direct main"
description:
name: meta
url: "https://pub.dartlang.org"
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
url: "https://pub.dev"
source: hosted
version: "1.8.0"
pedantic_mono:
Expand All @@ -54,7 +68,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.20.1"
version: "1.21.0"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -64,8 +78,9 @@ packages:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
version: "2.1.4"
sdks:
dart: ">=2.18.0 <3.0.0"
dart: ">=2.19.0 <4.0.0"
10 changes: 8 additions & 2 deletions lib/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,20 @@ linter:
- cascade_invocations
- cast_nullable_to_non_nullable
- close_sinks
- collection_methods_unrelated_type
# - combinators_ordering # Released in Dart 2.19
- comment_references
- dangling_library_doc_comments
- deprecated_consistency
- directives_ordering
# - discarded_futures
# - do_not_use_environment
- enable_null_safety
- eol_at_end_of_file
- flutter_style_todos
- invariant_booleans
- implicit_call_tearoffs
- join_return_with_assignment
- library_annotations
- lines_longer_than_80_chars
- literal_only_boolean_expressions
- no_adjacent_strings_in_list
Expand Down Expand Up @@ -78,11 +82,13 @@ linter:
- unawaited_futures
- unnecessary_await_in_return
- unnecessary_lambdas
- unnecessary_library_directive
- unnecessary_null_aware_operator_on_extension_on_nullable
- unnecessary_null_checks
- unnecessary_parenthesis
- unnecessary_statements
- unnecessary_to_list_in_spreads
- unreachable_from_main
- unsafe_html
# - use_build_context_synchronously
- use_colored_box
Expand All @@ -94,7 +100,7 @@ linter:
- use_named_constants
- use_setters_to_change_properties
- use_string_buffers
# - use_string_in_part_of_directives # Released in Dart 2.19
- use_string_in_part_of_directives
- use_super_parameters
- use_test_throws_matchers
- use_to_and_as_if_applicable
86 changes: 48 additions & 38 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,127 +5,137 @@ packages:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
url: "https://pub.dev"
source: hosted
version: "2.9.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
version: "2.10.0"
cli_util:
dependency: transitive
description:
name: cli_util
url: "https://pub.dartlang.org"
sha256: "66f86e916d285c1a93d3b79587d94bd71984a66aac4ff74e524cfa7877f1395c"
url: "https://pub.dev"
source: hosted
version: "0.3.5"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
url: "https://pub.dev"
source: hosted
version: "1.16.0"
version: "1.17.0"
file:
dependency: transitive
description:
name: file
url: "https://pub.dartlang.org"
sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d"
url: "https://pub.dev"
source: hosted
version: "6.1.2"
version: "6.1.4"
flutter_lints:
dependency: "direct main"
description:
name: flutter_lints
url: "https://pub.dartlang.org"
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
url: "https://pub.dev"
source: hosted
version: "2.0.1"
glob:
dependency: transitive
description:
name: glob
url: "https://pub.dartlang.org"
sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c"
url: "https://pub.dev"
source: hosted
version: "2.0.2"
version: "2.1.1"
grinder:
dependency: "direct dev"
description:
name: grinder
url: "https://pub.dartlang.org"
sha256: b24948a441fc65d07bc8b219d7ee8d6cc0af4cdb13823e0d3be6d848eb787b04
url: "https://pub.dev"
source: hosted
version: "0.9.1"
version: "0.9.2"
http:
dependency: "direct dev"
description:
name: http
url: "https://pub.dartlang.org"
sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482"
url: "https://pub.dev"
source: hosted
version: "0.13.4"
version: "0.13.5"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
url: "https://pub.dev"
source: hosted
version: "4.0.0"
version: "4.0.2"
lints:
dependency: transitive
description:
name: lints
url: "https://pub.dartlang.org"
sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
version: "2.0.1"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
url: "https://pub.dev"
source: hosted
version: "1.7.0"
version: "1.8.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev"
source: hosted
version: "1.8.1"
version: "1.8.3"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
url: "https://pub.dev"
source: hosted
version: "1.9.0"
version: "1.9.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
version: "1.2.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.2.1"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5"
url: "https://pub.dev"
source: hosted
version: "1.3.1"
yaml:
dependency: "direct dev"
description:
name: yaml
url: "https://pub.dartlang.org"
sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370"
url: "https://pub.dev"
source: hosted
version: "3.1.1"
sdks:
dart: ">=2.18.0 <3.0.0"
dart: ">=2.19.0 <4.0.0"
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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.20.1
version: 1.21.0
repository: https://github.com/mono0926/pedantic_mono
funding:
- https://github.com/sponsors/mono0926

environment:
sdk: '>=2.18.0 <3.0.0'
sdk: '>=2.19.0 <3.0.0'

dependencies:
flutter_lints: ^2.0.1
Expand Down
2 changes: 2 additions & 0 deletions tool/grind.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// ignore_for_file: unreachable_from_main

import 'package:grinder/grinder.dart';
import 'package:http/http.dart' as http;
import 'package:yaml/yaml.dart';
Expand Down

0 comments on commit f5459bd

Please sign in to comment.