43081j / eslint-plugin-lit

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

False negative lit/no-classfield-shadowing #193

Closed tpluscode closed 2 months ago

tpluscode commented 4 months ago

As I updated the plugin to v1.11, I now have lit/no-classfield-shadowing everywhere, for properties declared with lit@2 decorators

43081j commented 4 months ago

do you have an example?

may be that the rule just doesn't make sense with new decorators, but would have to see an example to be sure

tpluscode commented 4 months ago

Here's the smallest I could quickly concoct by extracting the setup from my project: https://gist.github.com/tpluscode/149377e20f27a47ae0e02fdd453f10a7

tpluscode commented 4 months ago

npx eslint element.ts --quiet will give you one error from the propety

steverep commented 2 months ago

We have the same problem with Home Assistant, except it occurs when upgrading to 1.12.0. We went from 0 errors to over 6000:

https://github.com/home-assistant/frontend/actions/runs/9081979074/job/24957190667?pr=20775

There was no change to config and deleting cache has no effect. Note the breakage also affects the lit/attribute-names rule.