CleverCloud / clever-components

Collection of Web Components by Clever Cloud
https://www.clever-cloud.com/doc/clever-components/
Apache License 2.0
218 stars 19 forks source link

Property / attribute names: avoid clashes with native #1125

Open florian-sanders-cc opened 1 month ago

florian-sanders-cc commented 1 month ago

Context

We have faced several cases with prop names that clashed with native properties / attributes.

For instance, exposing a prop title on a web component is not a good idea because it will generate a tooltip (native title behavior).

Disabled prop resets the focus when set to true with Chrome (see #1124).

We need to :

hsablonniere commented 3 weeks ago

I agree on this!

I had a look at this project https://github.com/43081j/eslint-plugin-wc and I don't see such a rule. I wonder how we will list and maintain all forbidden names.