-
Notifications
You must be signed in to change notification settings - Fork 26.6k
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
Conflicting rules 'no-confusing-arrow' and 'arrow-body-style' #752
Comments
Does it work if you use parentheses? export const conflict = (a) => (a > 1 ? 'yes' : 'no'); |
Adding parentheses still triggers |
Looks like this is also an eslint bug. I'll disable |
Published as v6.0.2 |
gilbox
pushed a commit
to gilbox/javascript
that referenced
this issue
Mar 21, 2016
jaylaw81
pushed a commit
to appirio-digital/ads-best-practices
that referenced
this issue
Sep 19, 2017
jaylaw81
pushed a commit
to appirio-digital/ads-best-practices
that referenced
this issue
Sep 19, 2017
…enabled. Per airbnb#752, fixes airbnb#791.
worked for me |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently I'm using
eslint
with the airbnb config to lint my project. However since the last update (6.0.1) i've found somewhat conflicting rules, the 'no-confusing-arrow' rule and the 'arrow-body-style' rule.Take this piece of code:
This triggers the
no-confusing-arrow
rule.According to the rule it should be written as following:
However this triggers the
arrow-body-style
rule.Any idea how to solve this while keeping the shorthand if?
Versions used:
The text was updated successfully, but these errors were encountered: