-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Enable and apply ESLint Jest rules #3270
Conversation
210b788
to
9c8cf45
Compare
9c8cf45
to
41e34c4
Compare
41e34c4
to
12794a9
Compare
Thanks, LGTM! Will merge it if @rejas has no complaints ... |
No complaints |
If anyone wants to take a look. I've been working on enabling the "jest/expect-expect" and "jest/no-done-callback" rules for a while now and adapting the code accordingly. I haven't come to an acceptable result and am putting it aside. |
is your work here? |
Ah, that's an attempt that I wasn't happy with either. If you want to investigate this, it might be better to ignore that attempt and change the rules yourself from "off" to "warn" and look at the issues from |
In any case, I think it's worth taking a look especially at rule "jest/no-done-callback", because its implementation might help us to avoid problems that we sometimes have with asynchronous code. |
Jest was in the plugin array of the ESLint configuration, but no rules were enabled. So ESLint hasn't checked any Jest rules yet.
So I activated the recommended Jest rules and added a few more. Then I fixed the issues (mostly automatically). I have deactivated the rules "jest/expect-expect" and "jest/no-done-callback" for the time being, as they would have entailed major changes. I didn't want to make the PR too big.
I'm not a Jest expert, but the changes so far look good to me. What do you think of that @khassel? 🙂