43081j / eslint-plugin-lit

lit-html support for ESLint
120 stars 22 forks source link

Add rule to disallow constructor arguments. #82

Closed justinfagnani closed 3 years ago

justinfagnani commented 3 years ago

We've seen some developers do this when the constructor is never going to be called. It can hide errors elsewhere in the element if that code assume the constructor would have been called with arguments.

43081j commented 3 years ago

Good idea 👍 Do you think this applies to all web components or just lit? Just wondering if it belongs in eslint-plugin-wc or here.

I probably should also update this plugin to recommend or give an option to also pull in the wc plugin.