dart-archive/angular_analyzer_plugin

Catch binding to native image properties natively which doesn't work

Opened this issue · 2 comments

Very easy to accidentally write

<image src="image.src" />

but that won't work, should be (I think...)

<image [src]="image.src" />

Note that this can be valid. So it should be a lint error, which we will try to keep separate.

Worth brainstorming where else these problems come up

It might be worth checking

  • if image exists on the component.
  • type of src is not String (or not compatible with String)
    IMHO these strongly indicate a binding was meant instead of a plain HTML attribute.

Is there a way to suppress lints in HTML? (like the // ignore: xxx comments in Dart code)