-
Notifications
You must be signed in to change notification settings - Fork 11
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
Guard super call with typeof check #134
Comments
it is stricter to check the type, probably a logical thing to do. however, there's already a lot of repos out there in the wild that just check the existence. if we changed this behaviour, we'd cause a lot of headache in terms of people updating their code given that many people are moving to typescript and needing this rule less over time, i think it makes sense to leave it as it is (even if its a looser check than it could be) |
Thank you for taking the time to look into my issue report and respond to it. I understand your point about not wanting to break existing code. I can see two ways to incorporate the change I proposed without breaking anything:
What do you think of these ideas? |
we could possibly add an option to the rule, like if it is enabled, require a |
That sounds perfect! 👍 |
It's better (more explicit) to guard a super call with a typeof check rather than a "truthy" check. Here's a patch to do that.
The text was updated successfully, but these errors were encountered: