Skip to content

Commit b8de1f1

Browse files
committed
Prepare for Flint 2.14.0
1 parent 89d8dc1 commit b8de1f1

File tree

12 files changed

+38
-9
lines changed

12 files changed

+38
-9
lines changed

flint/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 2.14.0 (19/08/2025)
2+
This update focuses on lint rules introduced in Dart 3.9.0.
3+
4+
Core ruleset:
5+
- Add `avoid_web_libraries_in_flutter`
6+
- Add `switch_on_type`
7+
- Add `unnecessary_unawaited`
8+
9+
110
## 2.13.1 (21/05/2025)
211
Fix accidental removal of page_width formatting.
312

flint/example/pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ homepage: https://github.com/forus-labs/cauldron
66
repository: https://github.com/forus-labs/cauldron
77

88
environment:
9-
sdk: '>=3.1.0 <4.0.0'
9+
sdk: '>=3.9.0 <4.0.0'
10+
resolution: workspace
1011

1112
dependencies:
1213
flint: ^2.1.0

flint/lib/analysis_options.dart.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ linter:
4141
- avoid_unnecessary_containers
4242
- avoid_unused_constructor_parameters
4343
- avoid_void_async
44+
- avoid_web_libraries_in_flutter
4445
- await_only_futures
4546
- camel_case_extensions
4647
- camel_case_types
@@ -139,6 +140,7 @@ linter:
139140
- sort_child_properties_last
140141
- sort_pub_dependencies
141142
- strict_top_level_inference
143+
- switch_on_type
142144
- test_types_in_equals
143145
- throw_in_finally
144146
- tighten_type_of_initializing_formals
@@ -170,6 +172,7 @@ linter:
170172
- unnecessary_string_interpolations
171173
- unnecessary_this
172174
- unnecessary_to_list_in_spreads
175+
- unnecessary_unawaited
173176
- unnecessary_underscores
174177
- unrelated_type_equality_checks
175178
- unsafe_html

flint/pubspec.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
name: flint
22
description: Analyzer lints used internally in Forus Labs' Dart & Flutter projects.
3-
version: 2.13.1
3+
version: 2.14.0
44
homepage: https://github.com/forus-labs/cauldron
55
repository: https://github.com/forus-labs/cauldron
66
topics: [lints]
77

88
environment:
9-
sdk: '>=3.8.0 <4.0.0'
9+
sdk: '>=3.9.0 <4.0.0'
1010
resolution: workspace
11+
workspace:
12+
- example
1113

1214
dev_dependencies:
1315
html: ^0.15.0

nitrogen/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.1
2+
* Bump dependencies
3+
4+
15
## 0.4.0
26
* Bump `dart_style` from 2.0.0 to 3.0.0.
37

nitrogen/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: nitrogen
22
description: Type safe Flutter asset generation.
33
topics: [assets, generation]
44

5-
version: 0.4.0
5+
version: 0.4.1
66
homepage: https://github.com/forus-labs/cauldron/tree/master/nitrogen
77
repository: https://github.com/forus-labs/cauldron/
88

@@ -12,7 +12,7 @@ environment:
1212
resolution: workspace
1313

1414
dependencies:
15-
build: ^2.4.1
15+
build: ^3.0.0
1616
build_runner: ^2.4.6
1717
code_builder: ^4.10.0
1818
dart_style: ^3.0.0
@@ -27,6 +27,6 @@ dependencies:
2727
yaml: ^3.1.2
2828

2929
dev_dependencies:
30-
build_test: ^2.2.2
30+
build_test: ^3.3.2
3131
flint:
3232
test: ^1.25.2

stevia/lib/src/widgets/async/future/future_builder.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ abstract base class _FutureBuilder<T, U> extends StatefulWidget {
5353
///
5454
/// When creating a new [FutureBuilder], you should prefer either the [_FutureValueBuilderState] or [_FutureResultBuilderState]
5555
/// subclasses.
56-
abstract base class _FutureBuilderState<Wrapped, Snapshot, Value, Builder extends _FutureBuilder<Wrapped, Value>> extends State<Builder> {
56+
abstract base class _FutureBuilderState<Wrapped, Snapshot, Value, B extends _FutureBuilder<Wrapped, Value>> extends State<B> {
5757
/// An object that identifies the currently active callbacks. Used to avoid
5858
/// calling setState from stale callbacks, e.g. after disposal of this state,
5959
/// or after widget reconfiguration to a new Future.
@@ -78,7 +78,7 @@ abstract base class _FutureBuilderState<Wrapped, Snapshot, Value, Builder extend
7878
}
7979

8080
@override
81-
void didUpdateWidget(Builder old) {
81+
void didUpdateWidget(B old) {
8282
super.didUpdateWidget(old);
8383
if (old.future == widget.future) {
8484
return;

stevia/test/src/services/haptic/platform_haptic_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// ignore_for_file: switch_on_type
2+
// TODO: Remove once https://github.com/dart-lang/sdk/issues/61355 is fixed
3+
14
import 'package:flutter_test/flutter_test.dart';
25
import 'package:stevia/services_haptic.dart';
36
import 'package:stevia/src/services/haptic/platform_haptic.dart';

stevia/test/src/services/time/platform_timezone_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// ignore_for_file: switch_on_type
2+
// TODO: Remove once https://github.com/dart-lang/sdk/issues/61355 is fixed
3+
14
import 'package:flutter/services.dart';
25
import 'package:flutter_test/flutter_test.dart';
36
import 'package:stevia/src/services/time/platform_timezone.dart';

sugar/analysis_options.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ analyzer:
88
unused_result: ignore # The rule seems to break almost every release.
99
exclude:
1010
- lib/src/time/zone/info/**
11+
- test/src/time/zone/providers/embedded/java_provider/bindings.dart
1112
- misc/**
1213
- out/**

0 commit comments

Comments
 (0)