-
Notifications
You must be signed in to change notification settings - Fork 537
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
Reenable eslint rule @typescript-eslint/unbound-method #9082
Comments
According to the comment in the minimal config: "This rule has false positives in many of our test projects." |
The rule is only completely disabled in the eslint7 config, which is no longer used by any package in the repo since the upgrade to eslint 8. The default config is now "minimal," which does disable the rule, but only for test files, where there are lots of false positives. We could consider using the jest version of the rule, though, as the docs suggest. |
Hmmm that's interesting. As-is I can write a violation of the rule but not see an error. On the other hand, when I added it directly to the package's .eslintrc.js it did get caught. |
I see it's disabled for test files, but... where is it enabled to begin with? Are we missing something in the |
Can we delete it from main? |
@ChumpChief - Assigning this to you since you're looking into restoring this and bunch of other rules to the common config. |
Reactivated #9093 to track getting the bulk of the rules back on (currently guessing I'll extend eslint7 in minimal). Even with that, the unbound-method rule is disabled in eslint7 so this should be considered separately. |
@ChumpChief @markfields I was reminded of why this got disabled originally... In a lot of projects, the rule throws an exception:
I tried upgrading @typescript-eslint/eslint-plugin but it still repros. I'll start looking through their open issues... |
That is a real bummer |
This just bit me today, I'm gonna prioritize it 😆 |
Thank you @ChumpChief ! What about the error Tyler mentioned above? |
I didn't hit it personally, so not sure exactly. |
Originally posted by @markfields in #8547 (comment)
More info on the rule is here: https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/unbound-method.md
Things will break badly if we start breaking it, as far as I can tell.
The text was updated successfully, but these errors were encountered: