Skip to content

Commit f46826c

Browse files
committed
Remove deprecated lints for Dart 3.3
1 parent c971380 commit f46826c

File tree

5 files changed

+18
-67
lines changed

5 files changed

+18
-67
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
## 2.4.0
4+
5+
Requires Dart `sdk: '>=3.3.0'`
6+
7+
- Remove [`iterable_contains_unrelated_type`](https://dart-lang.github.io/linter/lints/iterable_contains_unrelated_type.html)
8+
- Remove [`list_remove_unrelated_type`](https://dart-lang.github.io/linter/lints/list_remove_unrelated_type.html)
9+
- Remove [`always_require_non_null_named_parameters`](https://dart-lang.github.io/linter/lints/always_require_non_null_named_parameters.html)
10+
- Remove [`avoid_returning_null`](https://dart-lang.github.io/linter/lints/avoid_returning_null.html)
11+
- Remove [`avoid_returning_null_for_future`](https://dart-lang.github.io/linter/lints/avoid_returning_null_for_future.html)
12+
313
## 2.3.0
414

515
Requires Dart `sdk: '>=3.2.0'`

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Generally, you can just put `lint: ^2.0.0` in your `pubspec.yaml` and pub get th
7979

8080
| Dart Version | Lint Version |
8181
|--------------|---------------------------------------------------------------------|
82+
| `3.3` | [`2.4.0`](https://pub.dev/packages/lint/versions/2.4.0/changelog) |
8283
| `3.2` | [`2.3.0`](https://pub.dev/packages/lint/versions/2.3.0/changelog) |
8384
| `3.1` | [`2.2.0`](https://pub.dev/packages/lint/versions/2.2.0/changelog) |
8485
| `3.0` | [`2.1.0`](https://pub.dev/packages/lint/versions/2.1.0/changelog) |

lib/casual.yaml

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ linter:
4444
# http://dart-lang.github.io/linter/lints/always_declare_return_types.html
4545
# - always_put_required_named_parameters_first
4646

47-
# All non nullable named parameters should be and annotated with @required.
48-
# This allows API consumers to get warnings via lint rather than a crash a runtime.
49-
# Might become obsolete with Non-Nullable types
50-
#
51-
# http://dart-lang.github.io/linter/lints/always_require_non_null_named_parameters.html
52-
- always_require_non_null_named_parameters
5347

5448
# Always use package: imports.
5549
# While both, relative and package imports are fine, package imports are preferred because they allow for easy find
@@ -230,20 +224,6 @@ linter:
230224
# https://dart-lang.github.io/linter/lints/avoid_return_types_on_setters.html
231225
- avoid_return_types_on_setters
232226

233-
# Since nullsafety landed in dart, `int?` is completely fine to return null and `int` can't return `null` at all.
234-
#
235-
# In general there are plenty of valid reasons to return `null`, not a useful rule
236-
#
237-
# Dart SDK: >= 2.0.0 • (Linter v0.1.31)
238-
#
239-
# https://dart-lang.github.io/linter/lints/avoid_returning_null.html
240-
# - avoid_returning_null
241-
242-
# Don't use `Future?`, therefore never return null instead of a Future.
243-
# Will become obsolete one Non-Nullable types land
244-
# https://dart-lang.github.io/linter/lints/avoid_returning_null_for_future.html
245-
- avoid_returning_null_for_future
246-
247227
# Use empty returns, don't show off with your knowledge about dart internals.
248228
# https://dart-lang.github.io/linter/lints/avoid_returning_null_for_void.html
249229
- avoid_returning_null_for_void
@@ -516,10 +496,6 @@ linter:
516496
# https://dart-lang.github.io/linter/lints/invalid_case_patterns.html
517497
- invalid_case_patterns
518498

519-
# Deprecated, replaced by collection_methods_unrelated_type
520-
#
521-
# https://dart-lang.github.io/linter/lints/iterable_contains_unrelated_type.html
522-
# - iterable_contains_unrelated_type
523499

524500
# Hint to join return and assignment.
525501
#
@@ -562,11 +538,6 @@ linter:
562538
# https://dart-lang.github.io/linter/lints/lines_longer_than_80_chars.html
563539
# - lines_longer_than_80_chars
564540

565-
# Deprecated, replaced by collection_methods_unrelated_type
566-
#
567-
# https://dart-lang.github.io/linter/lints/list_remove_unrelated_type.html
568-
# - list_remove_unrelated_type
569-
570541
# Good for libraries to prevent unnecessary code paths.
571542
# False positives may occur for applications when boolean properties are generated by external programs
572543
# producing auto-generated source code
@@ -616,14 +587,14 @@ linter:
616587
# https://dart-lang.github.io/linter/lints/no_runtimeType_toString.html
617588
- no_runtimeType_toString
618589

619-
# Dont assign a variable to itself.
590+
# Don't assign a variable to itself.
620591
#
621592
# Dart SDK: >= 3.1.0
622593
#
623594
# https://dart.dev/tools/linter-rules/no_self_assignments
624595
- no_self_assignments
625596

626-
# Dont use wildcard parameters or variables. Code using this will break in the future.
597+
# Don't use wildcard parameters or variables. Code using this will break in the future.
627598
#
628599
# Dart SDK: >= 3.1.0
629600
#

lib/strict.yaml

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,6 @@ linter:
4747
# http://dart-lang.github.io/linter/lints/always_declare_return_types.html
4848
# - always_put_required_named_parameters_first
4949

50-
# All non nullable named parameters should be and annotated with @required.
51-
# This allows API consumers to get warnings via lint rather than a crash a runtime.
52-
# Might become obsolete with Non-Nullable types
53-
#
54-
# http://dart-lang.github.io/linter/lints/always_require_non_null_named_parameters.html
55-
- always_require_non_null_named_parameters
56-
5750
# Always use package: imports.
5851
# While both, relative and package imports are fine, package imports are preferred because they allow for easy find
5952
# and replace
@@ -233,20 +226,6 @@ linter:
233226
# https://dart-lang.github.io/linter/lints/avoid_return_types_on_setters.html
234227
- avoid_return_types_on_setters
235228

236-
# Since nullsafety landed in dart, `int?` is completely fine to return null and `int` can't return `null` at all.
237-
#
238-
# In general there are plenty of valid reasons to return `null`, not a useful rule
239-
#
240-
# Dart SDK: >= 2.0.0 • (Linter v0.1.31)
241-
#
242-
# https://dart-lang.github.io/linter/lints/avoid_returning_null.html
243-
# - avoid_returning_null
244-
245-
# Don't use `Future?`, therefore never return null instead of a Future.
246-
# Will become obsolete one Non-Nullable types land
247-
# https://dart-lang.github.io/linter/lints/avoid_returning_null_for_future.html
248-
- avoid_returning_null_for_future
249-
250229
# Use empty returns, don't show off with your knowledge about dart internals.
251230
# https://dart-lang.github.io/linter/lints/avoid_returning_null_for_void.html
252231
- avoid_returning_null_for_void
@@ -453,7 +432,7 @@ linter:
453432
# https://dart-lang.github.io/linter/lints/empty_catches.html
454433
- empty_catches
455434

456-
# Removed empty constructor bodies
435+
# Removes empty constructor bodies
457436
#
458437
# https://dart-lang.github.io/linter/lints/empty_constructor_bodies.html
459438
- empty_constructor_bodies
@@ -519,11 +498,6 @@ linter:
519498
# https://dart-lang.github.io/linter/lints/invalid_case_patterns.html
520499
- invalid_case_patterns
521500

522-
# Deprecated, replaced by collection_methods_unrelated_type
523-
#
524-
# https://dart-lang.github.io/linter/lints/iterable_contains_unrelated_type.html
525-
# - iterable_contains_unrelated_type
526-
527501
# Hint to join return and assignment.
528502
#
529503
# https://dart-lang.github.io/linter/lints/join_return_with_assignment.html
@@ -565,11 +539,6 @@ linter:
565539
# https://dart-lang.github.io/linter/lints/lines_longer_than_80_chars.html
566540
# - lines_longer_than_80_chars
567541

568-
# Deprecated, replaced by collection_methods_unrelated_type
569-
#
570-
# https://dart-lang.github.io/linter/lints/list_remove_unrelated_type.html
571-
# - list_remove_unrelated_type
572-
573542
# Good for libraries to prevent unnecessary code paths.
574543
# False positives may occur for applications when boolean properties are generated by external programs
575544
# producing auto-generated source code
@@ -619,14 +588,14 @@ linter:
619588
# https://dart-lang.github.io/linter/lints/no_runtimeType_toString.html
620589
- no_runtimeType_toString
621590

622-
# Dont assign a variable to itself.
591+
# Don't assign a variable to itself.
623592
#
624593
# Dart SDK: >= 3.1.0
625594
#
626595
# https://dart.dev/tools/linter-rules/no_self_assignments
627596
- no_self_assignments
628597

629-
# Dont use wildcard parameters or variables. Code using this will break in the future.
598+
# Don't use wildcard parameters or variables. Code using this will break in the future.
630599
#
631600
# Dart SDK: >= 3.1.0
632601
#

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: lint
2-
version: 2.3.0
2+
version: 2.4.0
33
description: An opinionated, community-driven set of lint rules for Dart and Flutter projects. Like pedantic but stricter
44
repository: https://github.com/passsy/dart-lint
55
issue_tracker: https://github.com/passsy/dart-lint/issues
66
topics:
77
- lint
88

99
environment:
10-
sdk: '>=3.2.0 <4.0.0'
10+
sdk: '>=3.3.0 <4.0.0'

0 commit comments

Comments
 (0)