-
Notifications
You must be signed in to change notification settings - Fork 22
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 (#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.
- Loading branch information
Showing
8 changed files
with
608 additions
and
411 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters