Skip to content

Commit da7532d

Browse files
authored
[ci][web] Ignore always_specify_types for JSArray. (#5669)
The definition of `JSArray` (and `JSPromise`) from `dart:js_interop` is changing to `JSArray<T>`, and our analyzer complains about our usage of it with default `T`s, blocking Dart SDK rolls. This PR ignores the `always_specify_types` lint in the usages of `JSArray`, so this code passes analysis both with the current version of `dart:js_interop` and the next one. ## Issues * Fixes flutter/flutter#140076 * Cleanup flutter/flutter#140095
1 parent ee593fd commit da7532d

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

packages/file_selector/file_selector_web/example/integration_test/dom_helper_test.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ void main() {
4747

4848
group('getFiles', () {
4949
final File mockFile1 =
50+
// TODO(srujzs): Remove once typed JSArrays (JSArray<T>) get to `stable`.
51+
// ignore: always_specify_types
5052
File(<Object>['123456'].jsify as JSArray, 'file1.txt');
53+
// TODO(srujzs): Remove once typed JSArrays (JSArray<T>) get to `stable`.
54+
// ignore: always_specify_types
5155
final File mockFile2 = File(<Object>[].jsify as JSArray, 'file2.txt');
5256

5357
testWidgets('works', (_) async {

packages/google_identity_services_web/example/integration_test/js_interop_id_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ void main() async {
6666
expectConfigValue('login_uri', 'https://www.example.com/login');
6767
expectConfigValue('native_callback', utils.isAJs('function'));
6868
expectConfigValue('cancel_on_tap_outside', isFalse);
69+
// TODO(srujzs): Remove once typed JSArrays (JSArray<T>) get to `stable`.
70+
// ignore: always_specify_types
6971
expectConfigValue('allowed_parent_origin', isA<JSArray>());
7072
expectConfigValue('prompt_parent_id', 'some_dom_id');
7173
expectConfigValue('nonce', 's0m3_r4ndOM_vALu3');

packages/google_identity_services_web/lib/src/js_interop/google_accounts_id.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ abstract class IdConfiguration {
338338
JSString? context,
339339
JSString? state_cookie_domain,
340340
JSString? ux_mode,
341+
// TODO(srujzs): Remove once typed JSArrays (JSArray<T>) get to `stable`.
342+
// ignore: always_specify_types
341343
JSArray? allowed_parent_origin,
342344
JSFunction? intermediate_iframe_close_callback,
343345
JSBoolean? itp_support,

packages/google_sign_in/google_sign_in_web/lib/src/flexible_size_html_element_view.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ class _FlexHtmlElementView extends State<FlexHtmlElementView> {
7373

7474
/// The function called whenever an observed resize occurs.
7575
void _onResizeEntries(
76+
// TODO(srujzs): Remove once typed JSArrays (JSArray<T>) get to `stable`.
77+
// ignore: always_specify_types
7678
JSArray resizes,
7779
web.ResizeObserver observer,
7880
) {
@@ -88,6 +90,8 @@ class _FlexHtmlElementView extends State<FlexHtmlElementView> {
8890
/// When mutations are received, this function attaches a Resize Observer to
8991
/// the first child of the mutation, which will drive
9092
void _onMutationRecords(
93+
// TODO(srujzs): Remove once typed JSArrays (JSArray<T>) get to `stable`.
94+
// ignore: always_specify_types
9195
JSArray mutations,
9296
web.MutationObserver observer,
9397
) {

0 commit comments

Comments
 (0)