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:
export const conflict = (a) => a > 1 ? 'yes' : 'no';
This triggers the no-confusing-arrow rule.
According to the rule it should be written as following:
export const conflict = (a) => {
return a > 1 ? 'yes' : 'no';
};
However this triggers the arrow-body-style rule.
Any idea how to solve this while keeping the shorthand if?
Versions used:
"eslint": "^2.2.0",
"eslint-config-airbnb": "^6.0.1",
Currently I'm using
eslintwith 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-arrowrule.According to the rule it should be written as following:
However this triggers the
arrow-body-stylerule.Any idea how to solve this while keeping the shorthand if?
Versions used: