43081j / eslint-plugin-lit

lit-html support for ESLint
116 stars 21 forks source link

feat: rework no-property-change-update rule #147

Closed 43081j closed 1 year ago

43081j commented 1 year ago

It is perfectly valid to mutate properties in update as long as you call super.update() at the end. This rule incorrectly marked these cases as invalid.

It now detects mutations to observed properties after super.update has been called and flags those as problems.

Fixes #62

maybe cc @larsdenbakker to check that i worded the docs correctly.

really the rule should be renamed but it'd be a breaking change and seems close enough as it is now.