lit-analyzer icon indicating copy to clipboard operation
lit-analyzer copied to clipboard

changedProperties check if name is actually a @property or @state

Open Christian24 opened this issue 3 years ago • 0 comments

Hello,

In Lit a lot of lifecycle callbacks use a Map called changedProperties which holds all properties that changed during the update. For example changedProperties.has('foo') says if property foo changed. If you rename the property foo now, you also need to rename it where ever you use it in changedProperties. This is error prone and a rule that would detect property names that are not actual properties would help ease the pain a little bit.

Christian24 avatar Apr 29 '21 19:04 Christian24