43081j / eslint-plugin-lit

lit-html support for ESLint
115 stars 20 forks source link

Add more native properties #174

Open abdonrd opened 1 year ago

abdonrd commented 1 year ago

There is the no-native-attributes rule:

https://github.com/43081j/eslint-plugin-lit/blob/master/docs/rules/no-native-attributes.md

But we also want to avoid native properties like className:

https://developer.mozilla.org/en-US/docs/Web/API/Element/className

We should have a different rule? Or just add more elements to the array?

https://github.com/43081j/eslint-plugin-lit/blob/7e40fca504f9f24eb80c32e4b1a9fa7206b9ba4b/src/rules/no-native-attributes.ts#L11-L44

Thanks!

43081j commented 1 year ago

sorry for the slow response, have been away the last few weeks

you've got a very good point.

it'd be so easy to just add them to the list, but i do feel like the right thing to do is probably two rules:

basically identical code other than the list of names.

what do you think?

abdonrd commented 1 year ago

I have the same feelings!