Open manucorporat opened 5 years ago
Help wanted!
For arrays, we can suggest using ReadonlyArray<T>
instead of T[]
and for objects we have the mapped type Readonly<T>
. That way, the checker can be simplified.
That's a great idea @Serabe ! and easy enough to implement
@manucorporat would it be better to split these rules out to individual issues? I see some have been added but the list hasn't been updated.
I just created a pull request with some rules and tests https://github.com/ionic-team/stencil-eslint/pull/2
Pending rules:
@Element()
's type must be HTML{tag-name}ElementProp()
@State()
and@Prop()
<Host>
vs returning array in render()<Host>
@Watch
decorators listens to existing prop or stateNaming:
Code quality