43081j / eslint-plugin-lit

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

no-legacy-imports rule #105

Closed 43081j closed 3 years ago

43081j commented 3 years ago

Fixes #89 Fixes #88

this does both in one...

stramel commented 3 years ago

I can't get this rule to work in the lit-element-starter-ts repo.

Question: Should we add a fix to swap it from @internalProperty to @state?

43081j commented 3 years ago

@stramel in the end i accidentally wrote the no-legacy-imports rule, so ive gone ahead and renamed this PR and the files.

we don't need a no-legacy-decorators as i think its better to detect it at the source: the import declaration. so have done that as part of this rule rather than us highlighting every individual decorator

43081j commented 3 years ago

hey @stramel i added a little change so we detect reactive-element now too, would you mind having another quick look over it? i also added the end columns to the assertions like you mentioned recently