Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow decorated properties with class fields
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.
- Loading branch information