googlearchive / polylint

Lint polymer!
BSD 3-Clause "New" or "Revised" License
116 stars 19 forks source link

Feature Request: Lint rule for binding to non-Polymer element properties #158

Open zacharytamas opened 7 years ago

zacharytamas commented 7 years ago

In Polymer if you are binding to a native <input> element's value property it is less straightforward and you have to specify the event Polymer should listen to:

<input type="text" value="{{addressInput::input}}">

It would be handy if Polylint would suggest this when you make the mistake of forgetting it, which doesn't setup a working binding:

<input type="text" value="{{addressInput}}">

The above doesn't actually bind the value of the value property to addressInput. There's no console warning or error... it just doesn't work. Seems like a lint warning would be valuable here.

zacharytamas commented 7 years ago

I guess this is specific to input[value] because of course we don't necessarily know how a non-Polymer custom element behaves: it might actually emit Polymer-compatible changed events and thus the linter would be complaining about nothing. But we do know how native HTML elements behave or should by the their specs.