-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
Turn off prefer-arrow-callback by default #31
Comments
I use |
Thanks for the fast reply! Still investigating a bit more, but I believe you're right. I'll keep digging and report back if anything comes up. |
@lydell I have a reproducible issue here: https://github.com/ismail-syed/prettier-eslint-config-invalid-code Could this be the result of |
Thanks! I managed to reduce the test cases. .eslintrc.js: module.exports = {
env: {es6: true},
plugins: ["prettier"],
rules: {
"prettier/prettier": "error",
"prefer-arrow-callback": "error",
}
} issue1.js: (
f(function() {
return
})
) ||
1; issue2.js: function f() {
return 1 && g(function() {
return
});
} A strange thing is that if I comment out
... the error does not happen. Neither does it if I:
So it seems to only happen when having both rules enabled and fixed at the same time. You have found a bug somewhere! The solution is not to add @not-an-aardvark Do you have any idea what could be going on? |
Yay! I went ahead and created an issue in I think the underlying bug exists in |
prefer-arrow-callback (and arrow-body-style) are now disabled by default in v4.0.0. See the docs for more information. |
👋 Would it be appropriate to add
prefer-arrow-callback
to the list of conflicting rules to be turned off?I had issues with this rule conflicting with our eslint config (which extends this
prettier
config). Turning offprefer-arrow-callback
solved our issues.Can I submit a PR?
The text was updated successfully, but these errors were encountered: