Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the 'missing-component-documentation-rule' in order to resolve the super.calls in events const #2600

Open
DavideMininni-Fincons opened this issue Apr 18, 2024 · 0 comments

Comments

@DavideMininni-Fincons
Copy link
Contributor

If a base class declares

public static readonly events = { 
    myEvent: 'myEvent', 
} 

and the derived class does an override like

public static readonly override events = { 
    ...super.event, 
    anotherEvent: 'anotherEvent',
}

the 'missing-component-documentation-rule' breaks, because it expects only properties and not a spread operator with super calls.

How to possibly fix it:
in missing-component-documentation-rule.ts, if isComponentClass(node) is true, the base class name can be found using node.superClass; however, if mixin composition is used, the base class could be retrieved by recursively looking at node.superClass.arguments (until is empty?)
how to retrieve the class instance from class name? how to retrieve the events?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant