angular_analyzer_plugin icon indicating copy to clipboard operation
angular_analyzer_plugin copied to clipboard

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

Open MichaelRFairhurst opened this issue 9 years ago • 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

MichaelRFairhurst avatar Nov 18 '16 22:11 MichaelRFairhurst

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.

zoechi avatar Nov 19 '16 10:11 zoechi

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

zoechi avatar Nov 19 '16 10:11 zoechi