Skip to content

[various] invalid_runtime_check_with_js_interop_types violations in web packages #187454

Description

@stuartmorgan-g

As part of re-syncing flutter/packages analysis options, we tried to pick up invalid_runtime_check_with_js_interop_types, but a bunch of our web plugins fail it:

  • camera_web: Lots of Catch clause with type 'DOMException' checks whether the caught value is a JS interop type
  • google_identity_services_web: A couple of Object/JObject cast/compares
  • google_maps_flutter_web: Various casts and compares
  • google_sign_in_web: Cast from 'JSAny?' to 'T' casts a JS interop value to a Dart type
  • video_player_web: Runtime check between 'Object' and 'DOMException' checks whether a Dart value is a JS interop type

Rather than try to fix them as part of merging in the new analysis options, I'm going to disable that one in the global config for now with a reference to this issue. Someone with JS interop experience should enable it and fix the violations.

Metadata

Metadata

Assignees

Labels

assigned for triageissue is assigned to a domain expert for further triagec: tech-debtTechnical debt, code quality, testing, etc.packageflutter/packages repository. See also p: labels.team-webOwned by Web platform team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions