Reputation: 4062
From the ESLint docs:
http://eslint.org/docs/rules/no-return-assign.html
I've tried using:
{
"no-return-assign": [ 2, "except-parens" ]
}
but this does not allow assignment in arrow returns. I want not to allow assignment on explicit keyword return assignment, but to allow it in arrow functions. Is this at all possible?
Upvotes: 1
Views: 6672
Reputation: 897
This is currently (May 10, 2016) not possible. See https://github.com/eslint/eslint/issues/5150, where this issue is discussed - the basic takeaway is that for now, your only options seem to be either to not use implicit returns that are assignment expressions without wrapping them in parentheses or removing the rule.
Upvotes: 1