-
Notifications
You must be signed in to change notification settings - Fork 240
Use suggestion instead of fix #586
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
Conversation
Actually, it doesn't simplify it as much as I thought :/ |
050be4c
to
526b608
Compare
Ah bugger - because @SimenB would you be ok with ignoring the coverage target for eslint v5? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dropping coverage check on eslint 5 sounds good
@@ -16,41 +17,132 @@ ruleTester.run('no-test-callback', rule, { | |||
'test("something", function() {})', | |||
'test("something", async function () {})', | |||
'test("something", someArg)', | |||
'test("something", (...args) => {args[0]();})', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should error here as well, although we can't apply the fix.
Jest just provides the one argument, so it's just the fixer that doesn't work, with the rule active we should still warn about this case
8532f5d
to
31bcaab
Compare
7e6a91b
to
5cd30c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
e295d24
to
ee19dee
Compare
b459153
to
7c828d2
Compare
7c828d2
to
e9a3e58
Compare
🎉 This PR is included in version 23.14.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I've done these as
fix
s because they're safer, so feels like it's ok to do a patch in?Also I realised how to break
no-test-callback
by not checking that it's type is anIdentifier
😂Are there any other rules we think should use an suggestion instead of autofixing? (or that don't have any fixes already that could suggest).
fixes #483
fixes #586