eslint-plugin-lit icon indicating copy to clipboard operation
eslint-plugin-lit copied to clipboard

Add more native properties

Open abdonrd opened this issue 11 months ago • 2 comments

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!

abdonrd avatar Jun 30 '23 13:06 abdonrd

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:

  • no-native-attributes
  • no-native-properties

basically identical code other than the list of names.

what do you think?

43081j avatar Jul 11 '23 17:07 43081j

I have the same feelings!

abdonrd avatar Jul 11 '23 17:07 abdonrd