You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: allow decorated properties with class fields (#201)
Allows properties decorated with lit property decorators to have class
fields alongside.
This loosens the strictness of the rule under the assumption you have
set `useDefineForClassFields: false` in typescript.
If you use `declare` or `accessor`, those fields will already be ignored
by this rule.
Examples:
```ts
// Error
class X extends LitElement {
fieldA;
static properties = {fieldA: {type: String}};
}
// Works now, errored before
class X extends LitElement {
@Property()
fieldA;
}
// Worked before, works now
class X extends LitElement {
@Property()
declare fieldA;
}
// Worked before, works now
class X extends LitElement {
declare fieldA;
static properties = {fieldA: {type: String}};
}
// Worked before, works now
class X extends LitElement {
@Property()
accessor fieldA;
}
```
Fixes#193.
0 commit comments